Hmm, I was looking for this. Can it be introduced?...
# stdlib
d
Hmm, I was looking for this. Can it be introduced?
Copy code
// do not introduce this overload --- too rare
//public fun <T, K> List<T>.binarySearchBy(key: K, comparator: Comparator<K>, fromIndex: Int = 0, toIndex: Int = size(), selector: (T) -> K): Int =
//        binarySearch(fromIndex, toIndex) { comparator.compare(selector(it), key) }