minWithOrNull

fun <T> Array<out T>.minWithOrNull(comparator: Comparator<in T>): T?(source)
fun IntArray.minWithOrNull(comparator: Comparator<in Int>): Int?(source)
fun <T> Iterable<T>.minWithOrNull(comparator: Comparator<in T>): T?(source)

Returns the first element having the smallest value according to the provided comparator or null if there are no elements.

Since Kotlin

1.4

inline fun <K, V> Map<out K, V>.minWithOrNull(comparator: Comparator<in Map.Entry<K, V>>): Map.Entry<K, V>?(source)

Returns the first entry having the smallest value according to the provided comparator or null if there are no entries.

Since Kotlin

1.4