Kotlin HashSet minByOrNull()
Syntax & Examples


Syntax of HashSet.minByOrNull()

The syntax of HashSet.minByOrNull() extension function is:

fun <T, R : Comparable<R>> Iterable<T>.minByOrNull( selector: (T) -> R ): T?

This minByOrNull() extension function of HashSet returns the first element yielding the smallest value of the given function or null if there are no elements.