Only publishes the last element of a stream that satisfies a error-throwing predicate closure, after the stream finishes.
- iOS 13.0+Beta
- macOS 10.15+Beta
- Mac Catalyst 13.0+Beta
- tvOS 13.0+Beta
- watchOS 6.0+Beta
- Xcode 11.0+Beta
A closure that takes an element as its parameter and returns a Boolean value indicating whether to publish the element.
A publisher that only publishes the last element satisfying the given predicate.
If the predicate closure throws, the publisher fails with the thrown error.