Module type Map_intf.Creators_and_accessors_genericSource
include Core.Map_intf.Creators_generic
with type ('a, 'b, 'c) t := ('a, 'b, 'c) t
with type ('a, 'b, 'c) tree := ('a, 'b, 'c) tree
with type 'a key := 'a key
with type 'a cmp := 'a cmp
with type ('a, 'b, 'c) create_options := ('a, 'b, 'c) create_options
with type ('a, 'b, 'c) access_options := ('a, 'b, 'c) access_options
include Map.Creators_generic
with type ('a, 'b, 'c) t := ('a, 'b, 'c) t
with type ('a, 'b, 'c) tree := ('a, 'b, 'c) tree
with type 'a key := 'a key
with type 'a cmp := 'a cmp
with type ('a, 'b, 'c) create_options := ('a, 'b, 'c) create_options
with type ('a, 'b, 'c) access_options := ('a, 'b, 'c) access_options
include Base.Dictionary_immutable.Creators
with type 'key key := 'key key
and type ('key, 'data, 'cmp) t := ('key, 'data, 'cmp) t
and type ('fn, 'key, _, 'cmp) creator := ('key, 'cmp, 'fn) create_options
val empty : ('k, 'cmp, ('k, _, 'cmp) t) create_optionsval singleton : ('k, 'cmp, 'k key -> 'v -> ('k, 'v, 'cmp) t) create_optionsval map_keys_exn :
('k2,
'cmp2,
('k1, 'v, 'cmp1) t ->
f:('k1 key -> 'k2 key) ->
('k2, 'v, 'cmp2) t)
create_optionsval transpose_keys :
('k1,
'cmp1,
('k2,
'cmp2,
('k1, ('k2, 'a, 'cmp2) t, 'cmp1) t ->
('k2, ('k1, 'a, 'cmp1) t, 'cmp2) t)
create_options)
access_optionsval of_sorted_array :
('k, 'cmp, ('k key * 'v) array -> ('k, 'v, 'cmp) t Base.Or_error.t)
create_optionsval of_sorted_array_unchecked :
('k, 'cmp, ('k key * 'v) array -> ('k, 'v, 'cmp) t) create_optionsval of_increasing_iterator_unchecked :
('k, 'cmp, len:int -> f:(int -> 'k key * 'v) -> ('k, 'v, 'cmp) t)
create_optionsval of_alist :
('k,
'cmp,
('k key * 'v) list ->
[ `Ok of ('k, 'v, 'cmp) t | `Duplicate_key of 'k key ])
create_optionsval of_alist_or_error :
('k, 'cmp, ('k key * 'v) list -> ('k, 'v, 'cmp) t Base.Or_error.t)
create_optionsval of_alist_exn :
('k, 'cmp, ('k key * 'v) list -> ('k, 'v, 'cmp) t) create_optionsval of_alist_multi :
('k, 'cmp, ('k key * 'v) list -> ('k, 'v list, 'cmp) t) create_optionsval of_alist_fold :
('k,
'cmp,
('k key * 'v1) list ->
init:'v2 ->
f:('v2 -> 'v1 -> 'v2) ->
('k, 'v2, 'cmp) t)
create_optionsval of_alist_reduce :
('k, 'cmp, ('k key * 'v) list -> f:('v -> 'v -> 'v) -> ('k, 'v, 'cmp) t)
create_optionsval of_increasing_sequence :
('k, 'cmp, ('k key * 'v) Base.Sequence.t -> ('k, 'v, 'cmp) t Base.Or_error.t)
create_optionsval of_sequence :
('k,
'cmp,
('k key * 'v) Base.Sequence.t ->
[ `Ok of ('k, 'v, 'cmp) t | `Duplicate_key of 'k key ])
create_optionsval of_sequence_or_error :
('k, 'cmp, ('k key * 'v) Base.Sequence.t -> ('k, 'v, 'cmp) t Base.Or_error.t)
create_optionsval of_sequence_exn :
('k, 'cmp, ('k key * 'v) Base.Sequence.t -> ('k, 'v, 'cmp) t) create_optionsval of_sequence_multi :
('k, 'cmp, ('k key * 'v) Base.Sequence.t -> ('k, 'v list, 'cmp) t)
create_optionsval of_sequence_fold :
('k,
'cmp,
('k key * 'v1) Base.Sequence.t ->
init:'v2 ->
f:('v2 -> 'v1 -> 'v2) ->
('k, 'v2, 'cmp) t)
create_optionsval of_sequence_reduce :
('k,
'cmp,
('k key * 'v) Base.Sequence.t ->
f:('v -> 'v -> 'v) ->
('k, 'v, 'cmp) t)
create_optionsval of_list_with_key :
('k,
'cmp,
'v list ->
get_key:('v -> 'k key) ->
[ `Ok of ('k, 'v, 'cmp) t | `Duplicate_key of 'k key ])
create_optionsval of_list_with_key_or_error :
('k,
'cmp,
'v list ->
get_key:('v -> 'k key) ->
('k, 'v, 'cmp) t Base.Or_error.t)
create_optionsval of_list_with_key_exn :
('k, 'cmp, 'v list -> get_key:('v -> 'k key) -> ('k, 'v, 'cmp) t)
create_optionsval of_list_with_key_multi :
('k, 'cmp, 'v list -> get_key:('v -> 'k key) -> ('k, 'v list, 'cmp) t)
create_optionsval of_list_with_key_fold :
('k,
'cmp,
'v list ->
get_key:('v -> 'k key) ->
init:'acc ->
f:('acc -> 'v -> 'acc) ->
('k, 'acc, 'cmp) t)
create_optionsval of_list_with_key_reduce :
('k,
'cmp,
'v list ->
get_key:('v -> 'k key) ->
f:('v -> 'v -> 'v) ->
('k, 'v, 'cmp) t)
create_optionsval of_iteri :
('k,
'cmp,
iteri:(f:(key:'k key -> data:'v -> unit) -> unit) ->
[ `Ok of ('k, 'v, 'cmp) t | `Duplicate_key of 'k key ])
create_optionsval of_iteri_exn :
('k,
'cmp,
iteri:(f:(key:'k key -> data:'v -> unit) -> unit) ->
('k, 'v, 'cmp) t)
create_optionsval of_tree :
('k, 'cmp, ('k key, 'v, 'cmp) tree -> ('k, 'v, 'cmp) t) create_optionsval of_hashtbl_exn :
('k, 'cmp, ('k key, 'v) Core.Hashtbl.t -> ('k, 'v, 'cmp) t) create_optionsval of_key_set :
('k key, 'cmp cmp) Base.Set.t ->
f:('k key -> 'v) ->
('k, 'v, 'cmp) tNever requires a comparator because it can get one from the input Set.t.
val quickcheck_generator :
('k,
'cmp,
'k key Core.Quickcheck.Generator.t ->
'v Core.Quickcheck.Generator.t ->
('k, 'v, 'cmp) t Core.Quickcheck.Generator.t)
create_optionsinclude Core.Map_intf.Accessors_generic
with type ('a, 'b, 'c) t := ('a, 'b, 'c) t
with type ('a, 'b, 'c) tree := ('a, 'b, 'c) tree
with type 'a key := 'a key
with type 'a cmp := 'a cmp
with type ('a, 'b, 'c) access_options := ('a, 'b, 'c) access_options
include Map.Accessors_generic
with type ('a, 'b, 'c) t := ('a, 'b, 'c) t
with type ('a, 'b, 'c) tree := ('a, 'b, 'c) tree
with type 'a key := 'a key
with type 'a cmp := 'a cmp
with type ('a, 'b, 'c) access_options := ('a, 'b, 'c) access_options
val invariants : ('k, 'cmp, ('k, 'v, 'cmp) t -> bool) access_optionsval is_empty : (_, _, _) t -> boolval length : (_, _, _) t -> intval add :
('k,
'cmp,
('k, 'v, 'cmp) t ->
key:'k key ->
data:'v ->
[ `Ok of ('k, 'v, 'cmp) t | `Duplicate ])
access_optionsval add_exn :
('k, 'cmp, ('k, 'v, 'cmp) t -> key:'k key -> data:'v -> ('k, 'v, 'cmp) t)
access_optionsval set :
('k, 'cmp, ('k, 'v, 'cmp) t -> key:'k key -> data:'v -> ('k, 'v, 'cmp) t)
access_optionsval add_multi :
('k,
'cmp,
('k, 'v list, 'cmp) t ->
key:'k key ->
data:'v ->
('k, 'v list, 'cmp) t)
access_optionsval remove_multi :
('k, 'cmp, ('k, 'v list, 'cmp) t -> 'k key -> ('k, 'v list, 'cmp) t)
access_optionsval find_multi :
('k, 'cmp, ('k, 'v list, 'cmp) t -> 'k key -> 'v list) access_optionsval change :
('k,
'cmp,
('k, 'v, 'cmp) t ->
'k key ->
f:('v option -> 'v option) ->
('k, 'v, 'cmp) t)
access_optionsval update :
('k,
'cmp,
('k, 'v, 'cmp) t ->
'k key ->
f:('v option -> 'v) ->
('k, 'v, 'cmp) t)
access_optionsval find : ('k, 'cmp, ('k, 'v, 'cmp) t -> 'k key -> 'v option) access_optionsval find_exn : ('k, 'cmp, ('k, 'v, 'cmp) t -> 'k key -> 'v) access_optionsval remove :
('k, 'cmp, ('k, 'v, 'cmp) t -> 'k key -> ('k, 'v, 'cmp) t) access_optionsval mem : ('k, 'cmp, ('k, _, 'cmp) t -> 'k key -> bool) access_optionsval iter : (_, 'v, _) t -> f:('v -> unit) -> unitval iteri_until :
('k, 'v, _) t ->
f:(key:'k key -> data:'v -> Map.Continue_or_stop.t) ->
Map.Finished_or_unfinished.tval iter2 :
('k,
'cmp,
('k, 'v1, 'cmp) t ->
('k, 'v2, 'cmp) t ->
f:
(key:'k key ->
data:[ `Left of 'v1 | `Right of 'v2 | `Both of 'v1 * 'v2 ] ->
unit) ->
unit)
access_optionsval fold_until :
('k, 'v, _) t ->
init:'acc ->
f:
(key:'k key ->
data:'v ->
'acc ->
('acc, 'final) Base.Container.Continue_or_stop.t) ->
finish:('acc -> 'final) ->
'finalval fold2 :
('k,
'cmp,
('k, 'v1, 'cmp) t ->
('k, 'v2, 'cmp) t ->
init:'acc ->
f:
(key:'k key ->
data:[ `Left of 'v1 | `Right of 'v2 | `Both of 'v1 * 'v2 ] ->
'acc ->
'acc) ->
'acc)
access_optionsval partition_mapi :
('k, 'v1, 'cmp) t ->
f:(key:'k key -> data:'v1 -> ('v2, 'v3) Base.Either.t) ->
('k, 'v2, 'cmp) t * ('k, 'v3, 'cmp) tval partition_map :
('k, 'v1, 'cmp) t ->
f:('v1 -> ('v2, 'v3) Base.Either.t) ->
('k, 'v2, 'cmp) t * ('k, 'v3, 'cmp) tval combine_errors :
('k,
'cmp,
('k, 'v Base.Or_error.t, 'cmp) t ->
('k, 'v, 'cmp) t Base.Or_error.t)
access_optionsval compare_direct :
('k, 'cmp, ('v -> 'v -> int) -> ('k, 'v, 'cmp) t -> ('k, 'v, 'cmp) t -> int)
access_optionsval equal :
('k,
'cmp,
('v -> 'v -> bool) ->
('k, 'v, 'cmp) t ->
('k, 'v, 'cmp) t ->
bool)
access_optionsval data : (_, 'v, _) t -> 'v listval merge :
('k,
'cmp,
('k, 'v1, 'cmp) t ->
('k, 'v2, 'cmp) t ->
f:
(key:'k key ->
[ `Left of 'v1 | `Right of 'v2 | `Both of 'v1 * 'v2 ] ->
'v3 option) ->
('k, 'v3, 'cmp) t)
access_optionsval merge_disjoint_exn :
('k, 'cmp, ('k, 'v, 'cmp) t -> ('k, 'v, 'cmp) t -> ('k, 'v, 'cmp) t)
access_optionsval merge_skewed :
('k,
'cmp,
('k, 'v, 'cmp) t ->
('k, 'v, 'cmp) t ->
combine:(key:'k key -> 'v -> 'v -> 'v) ->
('k, 'v, 'cmp) t)
access_optionsval symmetric_diff :
('k,
'cmp,
('k, 'v, 'cmp) t ->
('k, 'v, 'cmp) t ->
data_equal:('v -> 'v -> bool) ->
('k key * [ `Left of 'v | `Right of 'v | `Unequal of 'v * 'v ])
Base.Sequence.t)
access_optionsval fold_symmetric_diff :
('k,
'cmp,
('k, 'v, 'cmp) t ->
('k, 'v, 'cmp) t ->
data_equal:('v -> 'v -> bool) ->
init:'acc ->
f:
('acc ->
('k key * [ `Left of 'v | `Right of 'v | `Unequal of 'v * 'v ]) ->
'acc) ->
'acc)
access_optionsval for_all : ('k, 'v, _) t -> f:('v -> bool) -> boolval exists : ('k, 'v, _) t -> f:('v -> bool) -> boolval count : ('k, 'v, _) t -> f:('v -> bool) -> intval sum :
(module Base.Container.Summable with type t = 'a) ->
('k, 'v, _) t ->
f:('v -> 'a) ->
'aval sumi :
(module Base.Container.Summable with type t = 'a) ->
('k, 'v, _) t ->
f:(key:'k key -> data:'v -> 'a) ->
'aval split_le_gt :
('k, 'cmp, ('k, 'v, 'cmp) t -> 'k key -> ('k, 'v, 'cmp) t * ('k, 'v, 'cmp) t)
access_optionsval split_lt_ge :
('k, 'cmp, ('k, 'v, 'cmp) t -> 'k key -> ('k, 'v, 'cmp) t * ('k, 'v, 'cmp) t)
access_optionsval append :
('k,
'cmp,
lower_part:('k, 'v, 'cmp) t ->
upper_part:('k, 'v, 'cmp) t ->
[ `Ok of ('k, 'v, 'cmp) t | `Overlapping_key_ranges ])
access_optionsval subrange :
('k,
'cmp,
('k, 'v, 'cmp) t ->
lower_bound:'k key Base.Maybe_bound.t ->
upper_bound:'k key Base.Maybe_bound.t ->
('k, 'v, 'cmp) t)
access_optionsval fold_range_inclusive :
('k,
'cmp,
('k, 'v, 'cmp) t ->
min:'k key ->
max:'k key ->
init:'acc ->
f:(key:'k key -> data:'v -> 'acc -> 'acc) ->
'acc)
access_optionsval range_to_alist :
('k,
'cmp,
('k, 'v, 'cmp) t ->
min:'k key ->
max:'k key ->
('k key * 'v) list)
access_optionsval closest_key :
('k,
'cmp,
('k, 'v, 'cmp) t ->
[ `Greater_or_equal_to | `Greater_than | `Less_or_equal_to | `Less_than ] ->
'k key ->
('k key * 'v) option)
access_optionsval rank : ('k, 'cmp, ('k, _, 'cmp) t -> 'k key -> int option) access_optionsval to_sequence :
('k,
'cmp,
?order:[ `Increasing_key | `Decreasing_key ] ->
?keys_greater_or_equal_to:'k key ->
?keys_less_or_equal_to:'k key ->
('k, 'v, 'cmp) t ->
('k key * 'v) Base.Sequence.t)
access_optionsval binary_search :
('k,
'cmp,
('k, 'v, 'cmp) t ->
compare:(key:'k key -> data:'v -> 'key -> int) ->
Base.Binary_searchable.Which_target_by_key.t ->
'key ->
('k key * 'v) option)
access_optionsval binary_search_segmented :
('k,
'cmp,
('k, 'v, 'cmp) t ->
segment_of:(key:'k key -> data:'v -> [ `Left | `Right ]) ->
Base.Binary_searchable.Which_target_by_segment.t ->
('k key * 'v) option)
access_optionsval binary_search_subrange :
('k,
'cmp,
('k, 'v, 'cmp) t ->
compare:(key:'k key -> data:'v -> 'bound -> int) ->
lower_bound:'bound Base.Maybe_bound.t ->
upper_bound:'bound Base.Maybe_bound.t ->
('k, 'v, 'cmp) t)
access_optionsmodule Make_applicative_traversals
(A : Base.Applicative.Lazy_applicative) :
sig ... endval key_set :
('k, 'cmp, ('k, _, 'cmp) t -> ('k key, 'cmp cmp) Base.Set.t) access_optionsval validate :
name:('k key -> Base.String.t) ->
'v Validate.check ->
('k, 'v, _) t Validate.checkval validatei :
name:('k key -> Base.String.t) ->
('k key * 'v) Validate.check ->
('k, 'v, _) t Validate.checkval quickcheck_observer :
'k key Core.Quickcheck.Observer.t ->
'v Core.Quickcheck.Observer.t ->
('k, 'v, 'cmp) t Core.Quickcheck.Observer.tval quickcheck_shrinker :
('k,
'cmp,
'k key Core.Quickcheck.Shrinker.t ->
'v Core.Quickcheck.Shrinker.t ->
('k, 'v, 'cmp) t Core.Quickcheck.Shrinker.t)
access_options