bestBy

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

Returns the "best" value from the value.

Parameters

selectNew

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