base

Full standard library replacement for OCaml
IN THIS PACKAGE
type ('a, 'b, 'c) tree := ( 'a, 'b, 'c ) t
type ('k, 'v, 'w) t
val empty : ( 'k, 'v, 'w ) t
val add_exn : ( 'k, 'v, 'w ) t -> comparator:( 'k, 'w ) Comparator.t -> key:'k -> data:'v -> ( 'k, 'v, 'w ) t

Time complexity of add_exn is amortized constant-time (if t is used linearly), with a worst-case O(log(n)) time.

val to_tree : ( 'k, 'v, 'w ) t -> ( 'k, 'v, 'w ) tree

Time complexity is O(log(n)).