Using_comparator is a similar interface as the toplevel of Map, except the
functions take a ~comparator:('k, 'cmp) Comparator.t, whereas the functions at the
toplevel of Map take a ('k, 'cmp) comparator.
include sig ... endval sexp_of_t : ('k ‑> Base.Sexp.t) ‑> ('v ‑> Base.Sexp.t) ‑> ('cmp ‑> Base.Sexp.t) ‑> ('k, 'v, 'cmp) t ‑> Base.Sexp.tval t_of_sexp_direct : comparator:('k, 'cmp) Base.Comparator.t ‑> (Base.Sexp.t ‑> 'k) ‑> (Base.Sexp.t ‑> 'v) ‑> Base.Sexp.t ‑> ('k, 'v, 'cmp) tmodule Tree : sig ... endinclude Base__.Map_intf.Accessors3 with type (a, b, c) t := (a, b, c) t with type (a, b, c) tree := (a, b, c) Tree.tval invariants : (_, _, _) t ‑> boolval is_empty : (_, _, _) t ‑> boolval length : (_, _, _) t ‑> intval add : ('a, 'b, 'cmp) t ‑> key:'a ‑> data:'b ‑> ('a, 'b, 'cmp) t Base__.Map_intf.Or_duplicate.tval find_multi : ('a, 'b list, 'cmp) t ‑> 'a ‑> 'b listval find : ('a, 'b, 'cmp) t ‑> 'a ‑> 'b optionval find_exn : ('a, 'b, 'cmp) t ‑> 'a ‑> 'bval mem : ('a, 'b, 'cmp) t ‑> 'a ‑> boolval iter_keys : ('a, _, 'cmp) t ‑> f:('a ‑> unit) ‑> unitval iter : (_, 'b, 'cmp) t ‑> f:('b ‑> unit) ‑> unitval iteri : ('a, 'b, 'cmp) t ‑> f:(key:'a ‑> data:'b ‑> unit) ‑> unitval fold : ('a, 'b, _) t ‑> init:'c ‑> f:(key:'a ‑> data:'b ‑> 'c ‑> 'c) ‑> 'cval fold_right : ('a, 'b, _) t ‑> init:'c ‑> f:(key:'a ‑> data:'b ‑> 'c ‑> 'c) ‑> 'cval keys : ('a, _, _) t ‑> 'a listval data : (_, 'b, _) t ‑> 'b listval to_alist : ?key_order:[ `Increasing | `Decreasing ] ‑> ('a, 'b, _) t ‑> ('a * 'b) listval validate : name:('a ‑> string) ‑> 'b Base.Validate.check ‑> ('a, 'b, _) t Base.Validate.checkval symmetric_diff : ('a, 'b, 'cmp) t ‑> ('a, 'b, 'cmp) t ‑> data_equal:('b ‑> 'b ‑> bool) ‑> ('a, 'b) Base__.Map_intf.Symmetric_diff_element.t Base.Sequence.tval min_elt : ('a, 'b, 'cmp) t ‑> ('a * 'b) optionval min_elt_exn : ('a, 'b, 'cmp) t ‑> 'a * 'bval max_elt : ('a, 'b, 'cmp) t ‑> ('a * 'b) optionval max_elt_exn : ('a, 'b, 'cmp) t ‑> 'a * 'bval for_all : (_, 'b, _) t ‑> f:('b ‑> bool) ‑> boolval for_alli : ('a, 'b, _) t ‑> f:(key:'a ‑> data:'b ‑> bool) ‑> boolval exists : (_, 'b, _) t ‑> f:('b ‑> bool) ‑> boolval existsi : ('a, 'b, _) t ‑> f:(key:'a ‑> data:'b ‑> bool) ‑> boolval count : (_, 'b, _) t ‑> f:('b ‑> bool) ‑> intval counti : ('a, 'b, _) t ‑> f:(key:'a ‑> data:'b ‑> bool) ‑> intval subrange : ('k, 'v, 'cmp) t ‑> lower_bound:'k Base.Maybe_bound.t ‑> upper_bound:'k Base.Maybe_bound.t ‑> ('k, 'v, 'cmp) tval fold_range_inclusive : ('a, 'b, _) t ‑> min:'a ‑> max:'a ‑> init:'c ‑> f:(key:'a ‑> data:'b ‑> 'c ‑> 'c) ‑> 'cval range_to_alist : ('a, 'b, _) t ‑> min:'a ‑> max:'a ‑> ('a * 'b) listval closest_key : ('a, 'b, _) t ‑> [ `Greater_or_equal_to | `Greater_than | `Less_or_equal_to | `Less_than ] ‑> 'a ‑> ('a * 'b) optionval nth : ('a, 'b, _) t ‑> int ‑> ('a * 'b) optionval nth_exn : ('a, 'b, _) t ‑> int ‑> 'a * 'bval rank : ('a, _, _) t ‑> 'a ‑> int optionval to_sequence : ?order:[ `Increasing_key | `Decreasing_key ] ‑> ?keys_greater_or_equal_to:'a ‑> ?keys_less_or_equal_to:'a ‑> ('a, 'b, _) t ‑> ('a * 'b) Base.Sequence.tinclude Base__.Map_intf.Creators3_with_comparator with type (a, b, c) t := (a, b, c) t with type (a, b, c) tree := (a, b, c) Tree.tval empty : comparator:('a, 'cmp) Base.Comparator.t ‑> ('a, _, 'cmp) tval singleton : comparator:('a, 'cmp) Base.Comparator.t ‑> 'a ‑> 'b ‑> ('a, 'b, 'cmp) tval of_alist : comparator:('a, 'cmp) Base.Comparator.t ‑> ('a * 'b) list ‑> [ `Ok of ('a, 'b, 'cmp) t | `Duplicate_key of 'a ]val of_alist_or_error : comparator:('a, 'cmp) Base.Comparator.t ‑> ('a * 'b) list ‑> ('a, 'b, 'cmp) t Base.Or_error.tval of_alist_exn : comparator:('a, 'cmp) Base.Comparator.t ‑> ('a * 'b) list ‑> ('a, 'b, 'cmp) tval of_alist_multi : comparator:('a, 'cmp) Base.Comparator.t ‑> ('a * 'b) list ‑> ('a, 'b list, 'cmp) tval of_alist_fold : comparator:('a, 'cmp) Base.Comparator.t ‑> ('a * 'b) list ‑> init:'c ‑> f:('c ‑> 'b ‑> 'c) ‑> ('a, 'c, 'cmp) tval of_alist_reduce : comparator:('a, 'cmp) Base.Comparator.t ‑> ('a * 'b) list ‑> f:('b ‑> 'b ‑> 'b) ‑> ('a, 'b, 'cmp) tval of_sorted_array : comparator:('a, 'cmp) Base.Comparator.t ‑> ('a * 'b) array ‑> ('a, 'b, 'cmp) t Base.Or_error.tval of_sorted_array_unchecked : comparator:('a, 'cmp) Base.Comparator.t ‑> ('a * 'b) array ‑> ('a, 'b, 'cmp) tval of_increasing_iterator_unchecked : comparator:('a, 'cmp) Base.Comparator.t ‑> len:int ‑> f:(int ‑> 'a * 'b) ‑> ('a, 'b, 'cmp) tval of_increasing_sequence : comparator:('a, 'cmp) Base.Comparator.t ‑> ('a * 'b) Base.Sequence.t ‑> ('a, 'b, 'cmp) t Base.Or_error.tval of_iteri : comparator:('a, 'cmp) Base.Comparator.t ‑> iteri:(f:(key:'a ‑> data:'b ‑> unit) ‑> unit) ‑> [ `Ok of ('a, 'b, 'cmp) t | `Duplicate_key of 'a ]val of_tree : comparator:('a, 'cmp) Base.Comparator.t ‑> ('a, 'b, 'cmp) tree ‑> ('a, 'b, 'cmp) tval comparator : ('a, _, 'cmp) t ‑> ('a, 'cmp) Base.Comparator.tval hash_fold_direct : 'k Base.Hash.folder ‑> 'v Base.Hash.folder ‑> ('k, 'v, 'cmp) t Base.Hash.foldermodule Empty_without_value_restriction : functor (K : Base.Comparator.S1) -> sig ... endTo get around the value restriction, apply the functor and include it. You
can see an example of this in the Poly submodule below.