Map.Poly
A polymorphic Map.
type ('key, +'value) t = ('key, 'value, Comparator.Poly.comparator_witness) t
type ('key, +'value) tree =
('key, 'value, Comparator.Poly.comparator_witness) Using_comparator.Tree.t
type comparator_witness = Comparator.Poly.comparator_witness
val empty : ('k, _) t
val singleton : 'k -> 'v -> ('k, 'v) t
val of_sorted_array : ('k * 'v) array -> ('k, 'v) t Or_error.t
val of_sorted_array_unchecked : ('k * 'v) array -> ('k, 'v) t
val of_increasing_iterator_unchecked :
len:int ->
f:(int -> 'k * 'v) ->
('k, 'v) t
val of_alist : ('k * 'v) list -> [ `Ok of ('k, 'v) t | `Duplicate_key of 'k ]
val of_alist_or_error : ('k * 'v) list -> ('k, 'v) t Or_error.t
val of_alist_exn : ('k * 'v) list -> ('k, 'v) t
val of_alist_multi : ('k * 'v) list -> ('k, 'v list) t
val of_alist_fold :
('k * 'v1) list ->
init:'v2 ->
f:('v2 -> 'v1 -> 'v2) ->
('k, 'v2) t
val of_alist_reduce : ('k * 'v) list -> f:('v -> 'v -> 'v) -> ('k, 'v) t
val of_increasing_sequence : ('k * 'v) Sequence.t -> ('k, 'v) t Or_error.t
val of_sequence :
('k * 'v) Sequence.t ->
[ `Ok of ('k, 'v) t | `Duplicate_key of 'k ]
val of_sequence_or_error : ('k * 'v) Sequence.t -> ('k, 'v) t Or_error.t
val of_sequence_exn : ('k * 'v) Sequence.t -> ('k, 'v) t
val of_sequence_multi : ('k * 'v) Sequence.t -> ('k, 'v list) t
val of_sequence_fold :
('k * 'v1) Sequence.t ->
init:'v2 ->
f:('v2 -> 'v1 -> 'v2) ->
('k, 'v2) t
val of_sequence_reduce :
('k * 'v) Sequence.t ->
f:('v -> 'v -> 'v) ->
('k, 'v) t
val of_list_with_key :
'v list ->
get_key:('v -> 'k) ->
[ `Ok of ('k, 'v) t | `Duplicate_key of 'k ]
val of_list_with_key_or_error :
'v list ->
get_key:('v -> 'k) ->
('k, 'v) t Or_error.t
val of_list_with_key_exn : 'v list -> get_key:('v -> 'k) -> ('k, 'v) t
val of_list_with_key_multi : 'v list -> get_key:('v -> 'k) -> ('k, 'v list) t
val of_iteri :
iteri:(f:(key:'k -> data:'v -> unit) -> unit) ->
[ `Ok of ('k, 'v) t | `Duplicate_key of 'k ]
val of_iteri_exn : iteri:(f:(key:'k -> data:'v -> unit) -> unit) -> ('k, 'v) t
val invariants : ('k, 'v) t -> bool
val is_empty : (_, _) t -> bool
val length : (_, _) t -> int
val find_multi : ('k, 'v list) t -> 'k -> 'v list
val find : ('k, 'v) t -> 'k -> 'v option
val find_exn : ('k, 'v) t -> 'k -> 'v
val mem : ('k, _) t -> 'k -> bool
val iter_keys : ('k, _) t -> f:('k -> unit) -> unit
val iter : (_, 'v) t -> f:('v -> unit) -> unit
val iteri : ('k, 'v) t -> f:(key:'k -> data:'v -> unit) -> unit
val iteri_until :
('k, 'v) t ->
f:(key:'k -> data:'v -> Continue_or_stop.t) ->
Finished_or_unfinished.t
val fold :
('k, 'v) t ->
init:'acc ->
f:(key:'k -> data:'v -> 'acc -> 'acc) ->
'acc
val fold_until :
('k, 'v) t ->
init:'acc ->
f:(key:'k -> data:'v -> 'acc -> ('acc, 'final) Container.Continue_or_stop.t) ->
finish:('acc -> 'final) ->
'final
val fold_right :
('k, 'v) t ->
init:'acc ->
f:(key:'k -> data:'v -> 'acc -> 'acc) ->
'acc
val combine_errors : ('k, 'v Or_error.t) t -> ('k, 'v) t Or_error.t
val keys : ('k, _) t -> 'k list
val data : (_, 'v) t -> 'v list
val to_alist :
?key_order:[ `Increasing | `Decreasing ] ->
('k, 'v) t ->
('k * 'v) list
val symmetric_diff :
('k, 'v) t ->
('k, 'v) t ->
data_equal:('v -> 'v -> bool) ->
('k * [ `Left of 'v | `Right of 'v | `Unequal of 'v * 'v ]) Sequence.t
val min_elt : ('k, 'v) t -> ('k * 'v) option
val min_elt_exn : ('k, 'v) t -> 'k * 'v
val max_elt : ('k, 'v) t -> ('k * 'v) option
val max_elt_exn : ('k, 'v) t -> 'k * 'v
val for_all : ('k, 'v) t -> f:('v -> bool) -> bool
val for_alli : ('k, 'v) t -> f:(key:'k -> data:'v -> bool) -> bool
val exists : ('k, 'v) t -> f:('v -> bool) -> bool
val existsi : ('k, 'v) t -> f:(key:'k -> data:'v -> bool) -> bool
val count : ('k, 'v) t -> f:('v -> bool) -> int
val counti : ('k, 'v) t -> f:(key:'k -> data:'v -> bool) -> int
val subrange :
('k, 'v) t ->
lower_bound:'k Maybe_bound.t ->
upper_bound:'k Maybe_bound.t ->
('k, 'v) t
val fold_range_inclusive :
('k, 'v) t ->
min:'k ->
max:'k ->
init:'acc ->
f:(key:'k -> data:'v -> 'acc -> 'acc) ->
'acc
val range_to_alist : ('k, 'v) t -> min:'k -> max:'k -> ('k * 'v) list
val closest_key :
('k, 'v) t ->
[ `Greater_or_equal_to | `Greater_than | `Less_or_equal_to | `Less_than ] ->
'k ->
('k * 'v) option
val nth : ('k, 'v) t -> int -> ('k * 'v) option
val nth_exn : ('k, 'v) t -> int -> 'k * 'v
val rank : ('k, _) t -> 'k -> int option
val to_sequence :
?order:[ `Increasing_key | `Decreasing_key ] ->
?keys_greater_or_equal_to:'k ->
?keys_less_or_equal_to:'k ->
('k, 'v) t ->
('k * 'v) Sequence.t
val binary_search :
('k, 'v) t ->
compare:(key:'k -> data:'v -> 'key -> int) ->
Binary_searchable.Which_target_by_key.t ->
'key ->
('k * 'v) option
val binary_search_segmented :
('k, 'v) t ->
segment_of:(key:'k -> data:'v -> [ `Left | `Right ]) ->
Binary_searchable.Which_target_by_segment.t ->
('k * 'v) option
val binary_search_subrange :
('k, 'v) t ->
compare:(key:'k -> data:'v -> 'bound -> int) ->
lower_bound:'bound Maybe_bound.t ->
upper_bound:'bound Maybe_bound.t ->
('k, 'v) t
module Make_applicative_traversals
(A : Applicative.Lazy_applicative) :
sig ... end