binaryFindFirst

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

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

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.

Return

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