Module Map.Poly
A polymorphic Map.
include Base__.Map_intf.Accessors2 with type ('a, 'b) t := ('a, 'b) t with type ('a, 'b) tree := ('a, 'b) tree with type comparator_witness := comparator_witness
val binary_search_segmented : ('a, 'b) t -> segment_of:(key:'k -> data:'v -> [ `Left | `Right ]) -> [ `Last_on_left | `First_on_right ] -> ('k * 'v) optionval binary_search : ('a, 'b) t -> compare:(key:'k -> data:'v -> 'key -> int) -> [ `Last_strictly_less_than | `Last_less_than_or_equal_to | `Last_equal_to | `First_equal_to | `First_greater_than_or_equal_to | `First_strictly_greater_than ] -> 'key -> ('k * 'v) 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) Sequence.tval to_tree : ('a, 'b) t -> ('a, 'b) treeval rank : ('a, 'b) t -> 'a -> int optionval nth_exn : ('a, 'b) t -> int -> 'a * 'bval nth : ('a, 'b) t -> int -> ('a * 'b) optionval closest_key : ('a, 'b) t -> [ `Greater_or_equal_to | `Greater_than | `Less_or_equal_to | `Less_than ] -> 'a -> ('a * 'b) optionval range_to_alist : ('a, 'b) t -> min:'a -> max:'a -> ('a * 'b) listval fold_range_inclusive : ('a, 'b) t -> min:'a -> max:'a -> init:'c -> f:(key:'a -> data:'b -> 'c -> 'c) -> 'cval subrange : ('a, 'b) t -> lower_bound:'a Maybe_bound.t -> upper_bound:'a Maybe_bound.t -> ('a, 'b) tval append : lower_part:('a, 'b) t -> upper_part:('a, 'b) t -> [ `Ok of ('a, 'b) t | `Overlapping_key_ranges ]val split : ('a, 'b) t -> 'a -> ('a, 'b) t * ('a * 'b) option * ('a, 'b) tval counti : ('a, 'b) t -> f:(key:'a -> data:'b -> bool) -> intval count : ('a, 'b) t -> f:('b -> bool) -> intval existsi : ('a, 'b) t -> f:(key:'a -> data:'b -> bool) -> boolval exists : ('a, 'b) t -> f:('b -> bool) -> boolval for_alli : ('a, 'b) t -> f:(key:'a -> data:'b -> bool) -> boolval for_all : ('a, 'b) t -> f:('b -> bool) -> boolval max_elt_exn : ('a, 'b) t -> 'a * 'bval max_elt : ('a, 'b) t -> ('a * 'b) optionval min_elt_exn : ('a, 'b) t -> 'a * 'bval min_elt : ('a, 'b) t -> ('a * 'b) optionval fold_symmetric_diff : ('a, 'b) t -> ('a, 'b) t -> data_equal:('b -> 'b -> bool) -> init:'c -> f:('c -> ('a * [ `Left of 'b | `Right of 'b | `Unequal of 'b * 'b ]) -> 'c) -> 'cval symmetric_diff : ('a, 'b) t -> ('a, 'b) t -> data_equal:('b -> 'b -> bool) -> ('a, 'b) Base__.Map_intf.Symmetric_diff_element.t Sequence.tval merge : ('a, 'b) t -> ('a, 'b) t -> f:(key:'a -> [ `Left of 'b | `Right of 'c | `Both of 'b * 'c ] -> 'd option) -> ('a, 'b) tval validate : name:('a -> string) -> 'b Validate.check -> ('a, 'b) t Validate.checkval to_alist : ?key_order:[ `Increasing | `Decreasing ] -> ('a, 'b) t -> ('a * 'b) listval data : ('a, 'b) t -> 'b listval keys : ('a, 'b) t -> 'a listval equal : ('b -> 'b -> bool) -> ('a, 'b) t -> ('a, 'b) t -> boolval compare_direct : ('b -> 'b -> int) -> ('a, 'b) t -> ('a, 'b) t -> intval partition_tf : ('a, 'b) t -> f:('b -> bool) -> ('a, 'b) t * ('a, 'b) tval partitioni_tf : ('a, 'b) t -> f:(key:'a -> data:'b -> bool) -> ('a, 'b) t * ('a, 'b) tval partition_map : ('a, 'b) t -> f:('b -> [ `Fst of 'c | `Snd of 'd ]) -> ('a, 'b) t * ('a, 'b) tval partition_mapi : ('a, 'b) t -> f:(key:'a -> data:'b -> [ `Fst of 'c | `Snd of 'd ]) -> ('a, 'b) t * ('a, 'b) tval filter_mapi : ('a, 'b) t -> f:(key:'a -> data:'b -> 'c option) -> ('a, 'b) tval filter_map : ('a, 'b) t -> f:('b -> 'c option) -> ('a, 'b) tval filteri : ('a, 'b) t -> f:(key:'a -> data:'b -> bool) -> ('a, 'b) tval filter : ('a, 'b) t -> f:('b -> bool) -> ('a, 'b) tval filter_keys : ('a, 'b) t -> f:('a -> bool) -> ('a, 'b) tval fold2 : ('a, 'b) t -> ('a, 'b) t -> init:'d -> f:(key:'a -> data:[ `Left of 'b | `Right of 'c | `Both of 'b * 'c ] -> 'd -> 'd) -> 'dval fold_right : ('a, 'b) t -> init:'c -> f:(key:'a -> data:'b -> 'c -> 'c) -> 'cval fold : ('a, 'b) t -> init:'c -> f:(key:'a -> data:'b -> 'c -> 'c) -> 'cval mapi : ('a, 'b) t -> f:(key:'a -> data:'b -> 'c) -> ('a, 'b) tval map : ('a, 'b) t -> f:('b -> 'c) -> ('a, 'b) tval iter2 : ('a, 'b) t -> ('a, 'b) t -> f:(key:'a -> data:[ `Left of 'b | `Right of 'c | `Both of 'b * 'c ] -> unit) -> unitval iteri_until : ('a, 'b) t -> f:(key:'a -> data:'b -> Base__.Map_intf.Continue_or_stop.t) -> Base__.Map_intf.Finished_or_unfinished.tval iteri : ('a, 'b) t -> f:(key:'a -> data:'b -> unit) -> unitval iter : ('a, 'b) t -> f:('b -> unit) -> unitval iter_keys : ('a, 'b) t -> f:('a -> unit) -> unitval mem : ('a, 'b) t -> 'a -> boolval remove : ('a, 'b) t -> 'a -> ('a, 'b) tval find_exn : ('a, 'b) t -> 'a -> 'bval find : ('a, 'b) t -> 'a -> 'b optionval update : ('a, 'b) t -> 'a -> f:('b option -> 'b) -> ('a, 'b) tval change : ('a, 'b) t -> 'a -> f:('b option -> 'b option) -> ('a, 'b) tval find_multi : ('a, 'b) t -> 'a -> 'b listval remove_multi : ('a, 'b) t -> 'a -> ('a, 'b) tval add_multi : ('a, 'b) t -> key:'a -> data:'b -> ('a, 'b) tval set : ('a, 'b) t -> key:'a -> data:'b -> ('a, 'b) tval add_exn : ('a, 'b) t -> key:'a -> data:'b -> ('a, 'b) tval add : ('a, 'b) t -> key:'a -> data:'b -> [ `Ok of ('a, 'b) t | `Duplicate ]val length : ('a, 'b) t -> intval is_empty : ('a, 'b) t -> boolval invariants : ('a, 'b) t -> bool
include Base__.Map_intf.Creators2 with type ('key, +'value) t = ('key, 'value, Base__.Comparator.Poly.comparator_witness) t
val of_tree : ('a, 'b) tree -> ('a, 'b) tval of_iteri : iteri:(f:(key:'a -> data:'b -> unit) -> unit) -> [ `Ok of ('a, 'b) t | `Duplicate_key of 'a ]val of_sequence_reduce : ('a * 'b) Sequence.t -> f:('b -> 'b -> 'b) -> ('a, 'b) tval of_sequence_fold : ('a * 'b) Sequence.t -> init:'c -> f:('c -> 'b -> 'c) -> ('a, 'c) tval of_sequence_multi : ('a * 'b) Sequence.t -> ('a, 'b list) tval of_sequence_exn : ('a * 'b) Sequence.t -> ('a, 'b) tval of_sequence_or_error : ('a * 'b) Sequence.t -> ('a, 'b) t Or_error.tval of_sequence : ('a * 'b) Sequence.t -> [ `Ok of ('a, 'b) t | `Duplicate_key of 'a ]val of_increasing_sequence : ('a * 'b) Sequence.t -> ('a, 'b) t Or_error.tval of_increasing_iterator_unchecked : len:int -> f:(int -> 'a * 'b) -> ('a, 'b) tval of_sorted_array_unchecked : ('a * 'b) array -> ('a, 'b) tval of_sorted_array : ('a * 'b) array -> ('a, 'b) t Or_error.tval of_alist_reduce : ('a * 'b) list -> f:('b -> 'b -> 'b) -> ('a, 'b) tval of_alist_fold : ('a * 'b) list -> init:'c -> f:('c -> 'b -> 'c) -> ('a, 'c) tval of_alist_multi : ('a * 'b) list -> ('a, 'b list) tval of_alist_exn : ('a * 'b) list -> ('a, 'b) tval of_alist_or_error : ('a * 'b) list -> ('a, 'b) t Or_error.tval of_alist : ('a * 'b) list -> [ `Ok of ('a, 'b) t | `Duplicate_key of 'a ]val singleton : 'a -> 'b -> ('a, 'b) tval empty : (_, _) t
type comparator_witnesstype ('a, 'b) treetype ('key, +'value) t= ('key, 'value, Base__.Comparator.Poly.comparator_witness) t