code: @Override
    public KType removeFirst() {
      assert size() > 0 : "The deque is empty.";
  
      final KType result = Intrinsics.<KType> cast(buffer[head]);
      buffer[head] = Intrinsics.empty();
      head = oneRight(head, buffer.length);
      return result;
    }
docs: {@inheritDoc}