A collection that presents the elements of its base collection in reverse order.
- Xcode 8.0+
- Swift Standard Library
reversed() method is always lazy when applied to a collection with bidirectional indices, but does not implicitly confer laziness on algorithms applied to its result. In other words, for ordinary collections
c having bidirectional indices:
cdoes not create new storage
cmaps eagerly and returns a new array
cmaps lazily and returns a