Module Base.Binary_search
val binary_search :
?pos:int ->
?len:int ->
't ->
length:('t -> int) ->
get:('t -> int -> 'elt) ->
compare:('elt -> 'key -> int) ->
[ `First_equal_to
| `First_greater_than_or_equal_to
| `First_strictly_greater_than
| `Last_equal_to
| `Last_less_than_or_equal_to
| `Last_strictly_less_than ] ->
'key ->
int option
val binary_search_segmented :
?pos:int ->
?len:int ->
't ->
length:('t -> int) ->
get:('t -> int -> 'elt) ->
segment_of:('elt -> [ `Left | `Right ]) ->
[ `First_on_right | `Last_on_left ] ->
int option