@@ -123,17 +123,17 @@ extension _ReverseCollection
123
123
/// A Collection that presents the elements of its `Base` collection
124
124
/// in reverse order.
125
125
///
126
- /// - Note: This type is the result of `x.reverse ()` where `x` is a
126
+ /// - Note: This type is the result of `x.reversed ()` where `x` is a
127
127
/// collection having bidirectional indices.
128
128
///
129
- /// The `reverse ()` method is always lazy when applied to a collection
129
+ /// The `reversed ()` method is always lazy when applied to a collection
130
130
/// with bidirectional indices, but does not implicitly confer
131
131
/// laziness on algorithms applied to its result. In other words, for
132
132
/// ordinary collections `c` having bidirectional indices:
133
133
///
134
- /// * `c.reverse ()` does not create new storage
135
- /// * `c.reverse ().map(f)` maps eagerly and returns a new array
136
- /// * `c.lazy.reverse ().map(f)` maps lazily and returns a `LazyMapCollection`
134
+ /// * `c.reversed ()` does not create new storage
135
+ /// * `c.reversed ().map(f)` maps eagerly and returns a new array
136
+ /// * `c.lazy.reversed ().map(f)` maps lazily and returns a `LazyMapCollection`
137
137
///
138
138
/// - See also: `ReverseRandomAccessCollection`
139
139
public struct ReverseCollection <
@@ -163,7 +163,7 @@ public struct ReverseCollection<
163
163
/// A Collection that presents the elements of its `Base` collection
164
164
/// in reverse order.
165
165
///
166
- /// - Note: This type is the result of `x.reverse ()` where `x` is a
166
+ /// - Note: This type is the result of `x.reversed ()` where `x` is a
167
167
/// collection having random access indices.
168
168
/// - See also: `ReverseCollection`
169
169
public struct ReverseRandomAccessCollection <
@@ -197,7 +197,7 @@ extension Collection where Index : BidirectionalIndex {
197
197
///
198
198
/// - Complexity: O(1)
199
199
@warn_unused_result
200
- public func reverse ( ) -> ReverseCollection < Self > {
200
+ public func reversed ( ) -> ReverseCollection < Self > {
201
201
return ReverseCollection ( self )
202
202
}
203
203
}
@@ -207,7 +207,7 @@ extension Collection where Index : RandomAccessIndex {
207
207
///
208
208
/// - Complexity: O(1)
209
209
@warn_unused_result
210
- public func reverse ( ) -> ReverseRandomAccessCollection < Self > {
210
+ public func reversed ( ) -> ReverseRandomAccessCollection < Self > {
211
211
return ReverseRandomAccessCollection ( self )
212
212
}
213
213
}
@@ -218,7 +218,7 @@ where Index : BidirectionalIndex, Elements.Index : BidirectionalIndex {
218
218
///
219
219
/// - Complexity: O(1)
220
220
@warn_unused_result
221
- public func reverse ( ) -> LazyCollection <
221
+ public func reversed ( ) -> LazyCollection <
222
222
ReverseCollection < Elements >
223
223
> {
224
224
return ReverseCollection ( elements) . lazy
@@ -231,7 +231,7 @@ where Index : RandomAccessIndex, Elements.Index : RandomAccessIndex {
231
231
///
232
232
/// - Complexity: O(1)
233
233
@warn_unused_result
234
- public func reverse ( ) -> LazyCollection <
234
+ public func reversed ( ) -> LazyCollection <
235
235
ReverseRandomAccessCollection < Elements >
236
236
> {
237
237
return ReverseRandomAccessCollection ( elements) . lazy
0 commit comments