<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/ReversedCollection",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:s18ReversedCollectionV"
  },
  "title" : "ReversedCollection"
}
-->

# ReversedCollection

A collection that presents the elements of its base collection
in reverse order.

```
@frozen struct ReversedCollection<Base> where Base : BidirectionalCollection
```

## Overview> Note: This type is the result of `x.reversed()` where `x` is a
> collection having bidirectional indices.

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 storage
- `c.reversed().map(f)` maps eagerly and returns a new array
- `c.lazy.reversed().map(f)` maps lazily and returns a `LazyMapCollection`

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)
