Module type Binary_searchable_intf.Binary_searchable.S

module type S = Binary_searchable_intf.S

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.