module Make:
Parameters: |
|
type
elt
type
t
val binary_search : ?pos:int ->
?len:int ->
t ->
compare:(elt -> elt -> int) ->
elt -> int option
binary_search ?pos ?len t ~compare v
returns the index in t
holding a value
equal to v
according to compare
. It assumes that t
is sorted in nondecreasing
order according to compare
. By default, it does a binary search of the entire
t
. One can supply ?pos
?len
to search a slice of t
.