---
title: predicate
framework: combine
role: symbol
role_heading: Instance Property
path: combine/publishers/tryallsatisfy/predicate
---

# predicate

A closure that evaluates each received element.

## Declaration

```swift
let predicate: (Upstream.Output) throws -> Bool
```

## Discussion

Discussion Return true to continue, or false to cancel the upstream and complete. The closure may throw, in which case the publisher cancels the upstream publisher and fails with the thrown error.

## See Also

### Inspecting publisher properties

- [upstream](combine/publishers/tryallsatisfy/upstream.md)
