bestBy

fun <M> bestBy(selectNew: (old: M, new: M) -> Boolean): NonSuspendCollector<M, M?>(source)

Returns the "best" value from the value.

Parameters

selectNew

Decides whether the new value is "better" than the previous best.