Instance Method

tryMin(by:)

Publishes the minimum value received from the upstream publisher, using the provided error-throwing closure to order the items.

Declaration

func tryMin(by areInIncreasingOrder: @escaping ((A.Output, B.Output, C.Output, D.Output), (A.Output, B.Output, C.Output, D.Output)) throws -> Bool) -> Publishers.TryComparison<Publishers.Zip4<A, B, C, D>>

Parameters

areInIncreasingOrder

A throwing closure that receives two elements and returns true if they are in increasing order. If this closure throws, the publisher terminates with a Failure.

Return Value

A publisher that publishes the minimum value received from the upstream publisher, after the upstream publisher finishes.

Discussion

After this publisher receives a request for more than 0 items, it requests unlimited items from its upstream publisher.