Instance Method


Publishes the first element of a stream to satisfy a throwing predicate closure, then finishes.


func tryFirst(where predicate: @escaping ((A.Output, B.Output, C.Output)) throws -> Bool) -> Publishers.TryFirstWhere<Publishers.CombineLatest3<A, B, C>>



A closure that takes an element as a parameter and returns a Boolean value that indicates whether to publish the element.

Return Value

A publisher that only publishes the first element of a stream that satifies the predicate.


The publisher ignores all elements after the first. If this publisher doesn’t receive any elements, it finishes without publishing. If the predicate closure throws an error, the publisher fails with the thrown error.