---
title: "filter(_:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/anycollection/filter(_:)"
---

# filter(_:)

## Declaration

```swift
func filter(_ isIncluded: (Element) throws -> Bool) rethrows -> [Element]
```
