---
title: "first(where:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/optional/publisher-swift.struct/first(where:)"
---

# first(where:)

## Declaration

```swift
func first(where predicate: (Optional<Wrapped>.Publisher.Output) -> Bool) -> Optional<Wrapped>.Publisher
```
