maxWith
Returns the first element having the largest value according to the provided comparator.
The operation is terminal.
Exceptions
@DeprecatedSinceKotlin("1.4", "1.5", "1.6") fun <T> Sequence<T>.maxWith(
comparator: Comparator<in T>
): T?
(source)