maxBy

inline fun <T, R : Comparable<R>> Sequence<T>.maxBy(selector: (T) -> R): T?(source)

Deprecated

Use maxByOrNull instead.

Replace with

this.maxByOrNull(selector)

Since Kotlin

1.0