Instance Method

max(by:)

Publishes the maximum value received from the upstream publisher, using the provided ordering closure.

Declaration

func max(by areInIncreasingOrder: @escaping ((Output0, Output1), (Output0, Output1)) -> Bool) -> Publishers.Comparison<Publishers.MapKeyPath2<Upstream, Output0, Output1>>

Parameters

areInIncreasingOrder

A closure that receives two elements and returns true if they are in increasing order.

Return Value

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