Instance Method

max()

Publishes the maximum value received from the upstream publisher, after it finishes.

Declaration

func max() -> Publishers.Comparison<Publishers.TryLastWhere<Upstream>>
Available when Output conforms to Comparable.

Return Value

A publisher that publishes the maximum 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.