Binary search using a custom compare function.
Binary search using a custom compare function.
scala.util.Searching does not support the ability to search an IndexedSeq by a custom mapping function, you must search by an element of the same type as the elements of the Seq.
Must be sorted according to compare function so that for all i > j, compare(array(i), array(i)) == Greater.
Callback used at every guess index to determine whether the search element has been found, or whether to search above or below the guess index.
The first element where compare(element) == Equal. There is no guarantee which element is chosen if many elements return Equal.