package base
Module Map.Using_comparatorSource
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.
Source
val validatei :
name:('a -> string) ->
('a * 'b) Validate.check ->
('a, 'b, _) t Validate.checkSource
val symmetric_diff :
('a, 'b, 'cmp) t ->
('a, 'b, 'cmp) t ->
data_equal:('b -> 'b -> bool) ->
('a * [ `Left of 'b | `Right of 'b | `Unequal of 'b * 'b ]) Sequence.tSource
val subrange :
('k, 'v, 'cmp) t ->
lower_bound:'k Maybe_bound.t ->
upper_bound:'k Maybe_bound.t ->
('k, 'v, 'cmp) tSource
val 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.tSource
val of_alist :
comparator:('a, 'cmp) Comparator.t ->
('a * 'b) list ->
[ `Ok of ('a, 'b, 'cmp) t | `Duplicate_key of 'a ]Source
val of_alist_or_error :
comparator:('a, 'cmp) Comparator.t ->
('a * 'b) list ->
('a, 'b, 'cmp) t Or_error.tSource
val of_alist_multi :
comparator:('a, 'cmp) Comparator.t ->
('a * 'b) list ->
('a, 'b list, 'cmp) tSource
val of_alist_fold :
comparator:('a, 'cmp) Comparator.t ->
('a * 'b) list ->
init:'c ->
f:('c -> 'b -> 'c) ->
('a, 'c, 'cmp) tSource
val of_alist_reduce :
comparator:('a, 'cmp) Comparator.t ->
('a * 'b) list ->
f:('b -> 'b -> 'b) ->
('a, 'b, 'cmp) tSource
val of_sorted_array :
comparator:('a, 'cmp) Comparator.t ->
('a * 'b) array ->
('a, 'b, 'cmp) t Or_error.tSource
val of_sorted_array_unchecked :
comparator:('a, 'cmp) Comparator.t ->
('a * 'b) array ->
('a, 'b, 'cmp) tSource
val of_increasing_iterator_unchecked :
comparator:('a, 'cmp) Comparator.t ->
len:int ->
f:(int -> 'a * 'b) ->
('a, 'b, 'cmp) tSource
val of_increasing_sequence :
comparator:('a, 'cmp) Comparator.t ->
('a * 'b) Sequence.t ->
('a, 'b, 'cmp) t Or_error.tSource
val of_sequence :
comparator:('a, 'cmp) Comparator.t ->
('a * 'b) Sequence.t ->
[ `Ok of ('a, 'b, 'cmp) t | `Duplicate_key of 'a ]Source
val of_sequence_or_error :
comparator:('a, 'cmp) Comparator.t ->
('a * 'b) Sequence.t ->
('a, 'b, 'cmp) t Or_error.tSource
val of_sequence_exn :
comparator:('a, 'cmp) Comparator.t ->
('a * 'b) Sequence.t ->
('a, 'b, 'cmp) tSource
val of_sequence_multi :
comparator:('a, 'cmp) Comparator.t ->
('a * 'b) Sequence.t ->
('a, 'b list, 'cmp) tSource
val of_sequence_fold :
comparator:('a, 'cmp) Comparator.t ->
('a * 'b) Sequence.t ->
init:'c ->
f:('c -> 'b -> 'c) ->
('a, 'c, 'cmp) tSource
val of_sequence_reduce :
comparator:('a, 'cmp) Comparator.t ->
('a * 'b) Sequence.t ->
f:('b -> 'b -> 'b) ->
('a, 'b, 'cmp) tSource
val of_iteri :
comparator:('a, 'cmp) Comparator.t ->
iteri:(f:(key:'a -> data:'b -> unit) -> unit) ->
[ `Ok of ('a, 'b, 'cmp) t | `Duplicate_key of 'a ]To get around the value restriction, apply the functor and include it. You can see an example of this in the Poly submodule below.