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

# last(where:)

## Declaration

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