@@ -152,9 +152,7 @@ where SubSequence: RandomAccessCollection, Indices: RandomAccessCollection
152
152
/// is the same value as the result of `abs(distance)` calls to
153
153
/// `index(before:)`.
154
154
///
155
- /// - Complexity: O(1) if the collection conforms to
156
- /// `RandomAccessCollection`; otherwise, O(*k*), where *k* is the absolute
157
- /// value of `distance`.
155
+ /// - Complexity: O(1)
158
156
func index( _ i: Index , offsetBy distance: Int ) -> Index
159
157
160
158
/// Returns an index that is the specified distance from the given index,
@@ -196,9 +194,7 @@ where SubSequence: RandomAccessCollection, Indices: RandomAccessCollection
196
194
/// index would be beyond `limit` in the direction of movement. In that
197
195
/// case, the method returns `nil`.
198
196
///
199
- /// - Complexity: O(1) if the collection conforms to
200
- /// `RandomAccessCollection`; otherwise, O(*k*), where *k* is the absolute
201
- /// value of `distance`.
197
+ /// - Complexity: O(1)
202
198
func index(
203
199
_ i: Index , offsetBy distance: Int , limitedBy limit: Index
204
200
) -> Index ?
@@ -216,9 +212,7 @@ where SubSequence: RandomAccessCollection, Indices: RandomAccessCollection
216
212
/// negative only if the collection conforms to the
217
213
/// `BidirectionalCollection` protocol.
218
214
///
219
- /// - Complexity: O(1) if the collection conforms to
220
- /// `RandomAccessCollection`; otherwise, O(*k*), where *k* is the
221
- /// resulting distance.
215
+ /// - Complexity: O(1)
222
216
func distance( from start: Index , to end: Index ) -> Int
223
217
}
224
218
0 commit comments