     return result
   }
 
+  /// Returns a half-open range denoting the same positions as `r`.
   internal func _makeHalfOpen<
     R : RangeProtocol where R.Bound == Index
   >(_ r: R) -> Range<Index> {

  @warn_unused_result
  mutating func _customRemoveLast(_ n: Int) -> Bool

  /// Remove the element at `startIndex` and return it.
  ///
  /// - Complexity: O(`self.count`)
  /// - Precondition: `!self.isEmpty`.
  @discardableResult
  mutating func removeFirst() -> Iterator.Element

  /// Remove the first `n` elements.
  ///
  /// - Complexity: O(`self.count`)
  /// - Precondition: `n >= 0 && self.count >= n`.
  mutating func removeFirst(_ n: Int)

  /// Remove all elements.
  ///
  /// Invalidates all indices with respect to `self`.
  ///

  @discardableResult
  mutating func remove(at i: Index) -> _Element

  /// Removes all elements within `bounds`.
  ///
  /// Invalidates all indices with respect to `self`.
  ///
