<!--
{
  "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/LazyFilterCollection",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:s20LazyFilterCollectiona"
  },
  "title" : "LazyFilterCollection"
}
-->

# LazyFilterCollection

A lazy `Collection` wrapper that includes the elements of an
underlying collection that satisfy a predicate.

```
typealias LazyFilterCollection<T> = LazyFilterSequence<T> where T : Collection
```

## Discussion> Note: The performance of accessing `startIndex`, `first`, any methods
> that depend on `startIndex`, or of advancing an index depends
> on how sparsely the filtering predicate is satisfied, and may not offer
> the usual performance given by `Collection`. Be aware, therefore, that
> general operations on `LazyFilterCollection` instances may not have the
> documented complexity.

---

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)