binaryFindFirst

fun <T> List<T>.binaryFindFirst(predicate: (T) -> Boolean): T?

Searches this list for the first element matching the given predicate using the binary search algorithm. The list is expected to be sorted. Otherwise, the result is undefined.

Important: This is a Public Preview API. It may be changed or removed at any time.

Return

The found element, or null if no such element was found.