package core
Module Map.TreeSource
Source
val sexp_of_t :
('k -> Sexplib0.Sexp.t) ->
('v -> Sexplib0.Sexp.t) ->
('cmp -> Sexplib0.Sexp.t) ->
('k, 'v, 'cmp) t ->
Sexplib0.Sexp.tinclude Map_intf.Creators_and_accessors_generic
with type ('a, 'b, 'c) t := ('a, 'b, 'c) t
with type ('a, 'b, 'c) tree := ('a, 'b, 'c) t
with type 'cmp cmp := 'cmp
with type 'key key := 'key
with type ('a, 'b, 'c) create_options :=
('a, 'b, 'c) Base.Map.With_comparator.t
with type ('a, 'b, 'c) access_options :=
('a, 'b, 'c) Base.Map.With_comparator.t
include Map_intf.Creators_generic
with type ('a, 'b, 'c) t := ('a, 'b, 'c) t
with type ('a, 'b, 'c) tree := ('a, 'b, 'c) t
with type 'a key := 'a
with type 'a cmp := 'a
with type ('a, 'b, 'c) create_options :=
('a, 'b, 'c) Base.Map.With_comparator.t
with type ('a, 'b, 'c) access_options :=
('a, 'b, 'c) Base.Map.With_comparator.t
include Base.Map.Creators_generic
with type ('a, 'b, 'c) t := ('a, 'b, 'c) t
with type ('a, 'b, 'c) tree := ('a, 'b, 'c) t
with type 'a key := 'a
with type 'a cmp := 'a
with type ('a, 'b, 'c) create_options :=
('a, 'b, 'c) Base.Map.With_comparator.t
with type ('a, 'b, 'c) access_options :=
('a, 'b, 'c) Base.Map.With_comparator.t
Source
val map_keys :
('k2,
'cmp2,
('k1, 'v, 'cmp1) t ->
f:('k1 -> 'k2) ->
[ `Ok of ('k2, 'v, 'cmp2) t | `Duplicate_key of 'k2 ])
Base.Map.With_comparator.tSource
val map_keys_exn :
('k2, 'cmp2, ('k1, 'v, 'cmp1) t -> f:('k1 -> 'k2) -> ('k2, 'v, 'cmp2) t)
Base.Map.With_comparator.tSource
val transpose_keys :
('k1,
'cmp1,
('k2,
'cmp2,
('k1, ('k2, 'a, 'cmp2) t, 'cmp1) t ->
('k2, ('k1, 'a, 'cmp1) t, 'cmp2) t)
Base.Map.With_comparator.t)
Base.Map.With_comparator.tSource
val of_sorted_array :
('k, 'cmp, ('k * 'v) array -> ('k, 'v, 'cmp) t Base.Or_error.t)
Base.Map.With_comparator.tSource
val of_sorted_array_unchecked :
('k, 'cmp, ('k * 'v) array -> ('k, 'v, 'cmp) t) Base.Map.With_comparator.tSource
val of_increasing_iterator_unchecked :
('k, 'cmp, len:int -> f:(int -> 'k * 'v) -> ('k, 'v, 'cmp) t)
Base.Map.With_comparator.tSource
val of_alist :
('k,
'cmp,
('k * 'v) list ->
[ `Ok of ('k, 'v, 'cmp) t | `Duplicate_key of 'k ])
Base.Map.With_comparator.tSource
val of_alist_or_error :
('k, 'cmp, ('k * 'v) list -> ('k, 'v, 'cmp) t Base.Or_error.t)
Base.Map.With_comparator.tSource
val of_alist_multi :
('k, 'cmp, ('k * 'v) list -> ('k, 'v list, 'cmp) t)
Base.Map.With_comparator.tSource
val of_alist_fold :
('k,
'cmp,
('k * 'v1) list ->
init:'v2 ->
f:('v2 -> 'v1 -> 'v2) ->
('k, 'v2, 'cmp) t)
Base.Map.With_comparator.tSource
val of_alist_reduce :
('k, 'cmp, ('k * 'v) list -> f:('v -> 'v -> 'v) -> ('k, 'v, 'cmp) t)
Base.Map.With_comparator.tSource
val of_increasing_sequence :
('k, 'cmp, ('k * 'v) Base.Sequence.t -> ('k, 'v, 'cmp) t Base.Or_error.t)
Base.Map.With_comparator.tSource
val of_sequence :
('k,
'cmp,
('k * 'v) Base.Sequence.t ->
[ `Ok of ('k, 'v, 'cmp) t | `Duplicate_key of 'k ])
Base.Map.With_comparator.tSource
val of_sequence_or_error :
('k, 'cmp, ('k * 'v) Base.Sequence.t -> ('k, 'v, 'cmp) t Base.Or_error.t)
Base.Map.With_comparator.tSource
val of_sequence_exn :
('k, 'cmp, ('k * 'v) Base.Sequence.t -> ('k, 'v, 'cmp) t)
Base.Map.With_comparator.tSource
val of_sequence_multi :
('k, 'cmp, ('k * 'v) Base.Sequence.t -> ('k, 'v list, 'cmp) t)
Base.Map.With_comparator.tSource
val of_sequence_fold :
('k,
'cmp,
('k * 'v1) Base.Sequence.t ->
init:'v2 ->
f:('v2 -> 'v1 -> 'v2) ->
('k, 'v2, 'cmp) t)
Base.Map.With_comparator.tSource
val of_sequence_reduce :
('k,
'cmp,
('k * 'v) Base.Sequence.t ->
f:('v -> 'v -> 'v) ->
('k, 'v, 'cmp) t)
Base.Map.With_comparator.tSource
val of_list_with_key :
('k,
'cmp,
'v list ->
get_key:('v -> 'k) ->
[ `Ok of ('k, 'v, 'cmp) t | `Duplicate_key of 'k ])
Base.Map.With_comparator.tSource
val of_list_with_key_or_error :
('k, 'cmp, 'v list -> get_key:('v -> 'k) -> ('k, 'v, 'cmp) t Base.Or_error.t)
Base.Map.With_comparator.tSource
val of_list_with_key_exn :
('k, 'cmp, 'v list -> get_key:('v -> 'k) -> ('k, 'v, 'cmp) t)
Base.Map.With_comparator.tSource
val of_list_with_key_multi :
('k, 'cmp, 'v list -> get_key:('v -> 'k) -> ('k, 'v list, 'cmp) t)
Base.Map.With_comparator.tSource
val of_list_with_key_fold :
('k,
'cmp,
'v list ->
get_key:('v -> 'k) ->
init:'acc ->
f:('acc -> 'v -> 'acc) ->
('k, 'acc, 'cmp) t)
Base.Map.With_comparator.tSource
val of_list_with_key_reduce :
('k,
'cmp,
'v list ->
get_key:('v -> 'k) ->
f:('v -> 'v -> 'v) ->
('k, 'v, 'cmp) t)
Base.Map.With_comparator.tSource
val of_iteri :
('k,
'cmp,
iteri:(f:(key:'k -> data:'v -> unit) -> unit) ->
[ `Ok of ('k, 'v, 'cmp) t | `Duplicate_key of 'k ])
Base.Map.With_comparator.tSource
val of_iteri_exn :
('k, 'cmp, iteri:(f:(key:'k -> data:'v -> unit) -> unit) -> ('k, 'v, 'cmp) t)
Base.Map.With_comparator.tSource
val of_hashtbl_exn :
('k, 'cmp, ('k, 'v) Hashtbl.t -> ('k, 'v, 'cmp) t) Base.Map.With_comparator.tNever requires a comparator because it can get one from the input Set.t.
Source
val quickcheck_generator :
('k,
'cmp,
'k Quickcheck.Generator.t ->
'v Quickcheck.Generator.t ->
('k, 'v, 'cmp) t Quickcheck.Generator.t)
Base.Map.With_comparator.tinclude Map_intf.Accessors_generic
with type ('a, 'b, 'c) t := ('a, 'b, 'c) t
with type ('a, 'b, 'c) tree := ('a, 'b, 'c) t
with type 'a key := 'a
with type 'a cmp := 'a
with type ('a, 'b, 'c) access_options :=
('a, 'b, 'c) Base.Map.With_comparator.t
include Base.Map.Accessors_generic
with type ('a, 'b, 'c) t := ('a, 'b, 'c) t
with type ('a, 'b, 'c) tree := ('a, 'b, 'c) t
with type 'a key := 'a
with type 'a cmp := 'a
with type ('a, 'b, 'c) access_options :=
('a, 'b, 'c) Base.Map.With_comparator.t
Source
val add :
('k,
'cmp,
('k, 'v, 'cmp) t ->
key:'k ->
data:'v ->
[ `Ok of ('k, 'v, 'cmp) t | `Duplicate ])
Base.Map.With_comparator.tSource
val add_exn :
('k, 'cmp, ('k, 'v, 'cmp) t -> key:'k -> data:'v -> ('k, 'v, 'cmp) t)
Base.Map.With_comparator.tSource
val set :
('k, 'cmp, ('k, 'v, 'cmp) t -> key:'k -> data:'v -> ('k, 'v, 'cmp) t)
Base.Map.With_comparator.tSource
val add_multi :
('k,
'cmp,
('k, 'v list, 'cmp) t ->
key:'k ->
data:'v ->
('k, 'v list, 'cmp) t)
Base.Map.With_comparator.tSource
val remove_multi :
('k, 'cmp, ('k, 'v list, 'cmp) t -> 'k -> ('k, 'v list, 'cmp) t)
Base.Map.With_comparator.tSource
val find_multi :
('k, 'cmp, ('k, 'v list, 'cmp) t -> 'k -> 'v list) Base.Map.With_comparator.tSource
val change :
('k,
'cmp,
('k, 'v, 'cmp) t ->
'k ->
f:('v option -> 'v option) ->
('k, 'v, 'cmp) t)
Base.Map.With_comparator.tSource
val update :
('k, 'cmp, ('k, 'v, 'cmp) t -> 'k -> f:('v option -> 'v) -> ('k, 'v, 'cmp) t)
Base.Map.With_comparator.tSource
val remove :
('k, 'cmp, ('k, 'v, 'cmp) t -> 'k -> ('k, 'v, 'cmp) t)
Base.Map.With_comparator.tSource
val iteri_until :
('k, 'v, _) t ->
f:(key:'k -> data:'v -> Base.Map.Continue_or_stop.t) ->
Base.Map.Finished_or_unfinished.tSource
val iter2 :
('k,
'cmp,
('k, 'v1, 'cmp) t ->
('k, 'v2, 'cmp) t ->
f:
(key:'k ->
data:[ `Left of 'v1 | `Right of 'v2 | `Both of 'v1 * 'v2 ] ->
unit) ->
unit)
Base.Map.With_comparator.tSource
val fold_until :
('k, 'v, _) t ->
init:'acc ->
f:
(key:'k ->
data:'v ->
'acc ->
('acc, 'final) Base.Container.Continue_or_stop.t) ->
finish:('acc -> 'final) ->
'finalSource
val fold2 :
('k,
'cmp,
('k, 'v1, 'cmp) t ->
('k, 'v2, 'cmp) t ->
init:'acc ->
f:
(key:'k ->
data:[ `Left of 'v1 | `Right of 'v2 | `Both of 'v1 * 'v2 ] ->
'acc ->
'acc) ->
'acc)
Base.Map.With_comparator.tSource
val partition_mapi :
('k, 'v1, 'cmp) t ->
f:(key:'k -> data:'v1 -> ('v2, 'v3) Base.Either.t) ->
('k, 'v2, 'cmp) t * ('k, 'v3, 'cmp) tSource
val partition_map :
('k, 'v1, 'cmp) t ->
f:('v1 -> ('v2, 'v3) Base.Either.t) ->
('k, 'v2, 'cmp) t * ('k, 'v3, 'cmp) tSource
val combine_errors :
('k,
'cmp,
('k, 'v Base.Or_error.t, 'cmp) t ->
('k, 'v, 'cmp) t Base.Or_error.t)
Base.Map.With_comparator.tSource
val compare_direct :
('k, 'cmp, ('v -> 'v -> int) -> ('k, 'v, 'cmp) t -> ('k, 'v, 'cmp) t -> int)
Base.Map.With_comparator.tSource
val equal :
('k,
'cmp,
('v -> 'v -> bool) ->
('k, 'v, 'cmp) t ->
('k, 'v, 'cmp) t ->
bool)
Base.Map.With_comparator.tSource
val merge :
('k,
'cmp,
('k, 'v1, 'cmp) t ->
('k, 'v2, 'cmp) t ->
f:
(key:'k ->
[ `Left of 'v1 | `Right of 'v2 | `Both of 'v1 * 'v2 ] ->
'v3 option) ->
('k, 'v3, 'cmp) t)
Base.Map.With_comparator.tSource
val merge_disjoint_exn :
('k, 'cmp, ('k, 'v, 'cmp) t -> ('k, 'v, 'cmp) t -> ('k, 'v, 'cmp) t)
Base.Map.With_comparator.tSource
val merge_skewed :
('k,
'cmp,
('k, 'v, 'cmp) t ->
('k, 'v, 'cmp) t ->
combine:(key:'k -> 'v -> 'v -> 'v) ->
('k, 'v, 'cmp) t)
Base.Map.With_comparator.tSource
val symmetric_diff :
('k,
'cmp,
('k, 'v, 'cmp) t ->
('k, 'v, 'cmp) t ->
data_equal:('v -> 'v -> bool) ->
('k * [ `Left of 'v | `Right of 'v | `Unequal of 'v * 'v ]) Base.Sequence.t)
Base.Map.With_comparator.tSource
val fold_symmetric_diff :
('k,
'cmp,
('k, 'v, 'cmp) t ->
('k, 'v, 'cmp) t ->
data_equal:('v -> 'v -> bool) ->
init:'acc ->
f:
('acc ->
('k * [ `Left of 'v | `Right of 'v | `Unequal of 'v * 'v ]) ->
'acc) ->
'acc)
Base.Map.With_comparator.tSource
val sum :
(module Base.Container.Summable with type t = 'a) ->
('k, 'v, _) t ->
f:('v -> 'a) ->
'aSource
val sumi :
(module Base.Container.Summable with type t = 'a) ->
('k, 'v, _) t ->
f:(key:'k -> data:'v -> 'a) ->
'aSource
val split :
('k,
'cmp,
('k, 'v, 'cmp) t ->
'k ->
('k, 'v, 'cmp) t * ('k * 'v) option * ('k, 'v, 'cmp) t)
Base.Map.With_comparator.tSource
val split_le_gt :
('k, 'cmp, ('k, 'v, 'cmp) t -> 'k -> ('k, 'v, 'cmp) t * ('k, 'v, 'cmp) t)
Base.Map.With_comparator.tSource
val split_lt_ge :
('k, 'cmp, ('k, 'v, 'cmp) t -> 'k -> ('k, 'v, 'cmp) t * ('k, 'v, 'cmp) t)
Base.Map.With_comparator.tSource
val append :
('k,
'cmp,
lower_part:('k, 'v, 'cmp) t ->
upper_part:('k, 'v, 'cmp) t ->
[ `Ok of ('k, 'v, 'cmp) t | `Overlapping_key_ranges ])
Base.Map.With_comparator.tSource
val subrange :
('k,
'cmp,
('k, 'v, 'cmp) t ->
lower_bound:'k Base.Maybe_bound.t ->
upper_bound:'k Base.Maybe_bound.t ->
('k, 'v, 'cmp) t)
Base.Map.With_comparator.tSource
val fold_range_inclusive :
('k,
'cmp,
('k, 'v, 'cmp) t ->
min:'k ->
max:'k ->
init:'acc ->
f:(key:'k -> data:'v -> 'acc -> 'acc) ->
'acc)
Base.Map.With_comparator.tSource
val range_to_alist :
('k, 'cmp, ('k, 'v, 'cmp) t -> min:'k -> max:'k -> ('k * 'v) list)
Base.Map.With_comparator.tSource
val closest_key :
('k,
'cmp,
('k, 'v, 'cmp) t ->
[ `Greater_or_equal_to | `Greater_than | `Less_or_equal_to | `Less_than ] ->
'k ->
('k * 'v) option)
Base.Map.With_comparator.tSource
val to_sequence :
('k,
'cmp,
?order:[ `Increasing_key | `Decreasing_key ] ->
?keys_greater_or_equal_to:'k ->
?keys_less_or_equal_to:'k ->
('k, 'v, 'cmp) t ->
('k * 'v) Base.Sequence.t)
Base.Map.With_comparator.tSource
val binary_search :
('k,
'cmp,
('k, 'v, 'cmp) t ->
compare:(key:'k -> data:'v -> 'key -> int) ->
Base.Binary_searchable.Which_target_by_key.t ->
'key ->
('k * 'v) option)
Base.Map.With_comparator.tSource
val binary_search_segmented :
('k,
'cmp,
('k, 'v, 'cmp) t ->
segment_of:(key:'k -> data:'v -> [ `Left | `Right ]) ->
Base.Binary_searchable.Which_target_by_segment.t ->
('k * 'v) option)
Base.Map.With_comparator.tSource
val binary_search_subrange :
('k,
'cmp,
('k, 'v, 'cmp) t ->
compare:(key:'k -> data:'v -> 'bound -> int) ->
lower_bound:'bound Base.Maybe_bound.t ->
upper_bound:'bound Base.Maybe_bound.t ->
('k, 'v, 'cmp) t)
Base.Map.With_comparator.tSource
val validate :
name:('k -> Base.String.t) ->
'v Validate.check ->
('k, 'v, _) t Validate.checkSource
val validatei :
name:('k -> Base.String.t) ->
('k * 'v) Validate.check ->
('k, 'v, _) t Validate.checkSource
val quickcheck_observer :
'k Quickcheck.Observer.t ->
'v Quickcheck.Observer.t ->
('k, 'v, 'cmp) t Quickcheck.Observer.tSource
val quickcheck_shrinker :
('k,
'cmp,
'k Quickcheck.Shrinker.t ->
'v Quickcheck.Shrinker.t ->
('k, 'v, 'cmp) t Quickcheck.Shrinker.t)
Base.Map.With_comparator.t