minWith

Common
JVM
JS
Native
1.7
@JvmName("minWithOrThrow") fun <T> Sequence<T>.minWith(
    comparator: Comparator<in T>
): T

(source)

Returns the first element having the smallest value according to the provided comparator.

The operation is terminal.

Exceptions

NoSuchElementException - if the sequence is empty.

JVM
1.0
@DeprecatedSinceKotlin("1.4", "1.5", "1.6") fun <T> Sequence<T>.minWith(
    comparator: Comparator<in T>
): T?

(source)
Deprecated: Use minWithOrNull instead.