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