Publishes the minimum value received from the upstream publisher, after it finishes.
SDKs
- iOS 13.0+
- macOS 10.15+
- Mac Catalyst 13.0+
- tvOS 13.0+
- watchOS 6.0+
- Xcode 11.0+
Framework
- Combine
Declaration
func min(by areInIncreasingOrder: @escaping ((Output0, Output1), (Output0, Output1)) -> Bool) -> Publishers.Comparison<Publishers.Map Key Path2<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 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.