ReversedCollection
A collection that presents the elements of its base collection in reverse order.
Declaration
@frozen struct ReversedCollection<Base> where Base : BidirectionalCollectionOverview
The 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:
c.reversed()does not create new storagec.reversed().map(f)maps eagerly and returns a new arrayc.lazy.reversed().map(f)maps lazily and returns aLazyMapCollection