Module Irmin_pack_unix.UtilsSource

Sourcemodule Object_counter : sig ... end
Sourceval nearest_leq : arr:'a -> get:('a -> int -> 'b) -> lo:int -> hi:int -> key:'b -> [> `All_gt_key | `Some of int ]

nearest_leq ~arr ~get ~lo ~hi ~key returns the nearest entry in the sorted arr that is <= the given key. Routine is based on binary search.