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

# filter(_:)

## Declaration

```swift
func filter(_ predicate: Predicate<Self.Element>) throws -> [Self.Element]
```
