module Make: functor (
Fold
:
Foldable
) ->
S
with type in_value = Fold.data
and type out_value = Fold.t
Builds a fold_map
type
in_value
The type of the values being fold over.
type
out_value
The type of the accumulator
type 'key
t = private ('key, out_value) Core.Std.Map.Poly.t
type 'a
_in_value = in_value
type 'a
_out_value = out_value
type ('a, 'b)
_t = 'a t
val empty : 'a t
A map containing no bindings
val singleton : 'a -> in_value -> 'a t
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : key:'a -> data:in_value -> 'a t -> 'a t
add m ~key ~data
adds the key to the value already bound to key
in m
. If no
value is bound to key
than the initial value specified by the functor will be
used instead.
val find : 'a t -> 'a -> out_value
val remove : 'a t -> 'a -> 'a t
val set : key:'a -> data:out_value -> 'a t -> 'a t
val mem : 'a t -> 'a -> bool
val iter : 'a t -> f:(key:'a -> data:out_value -> unit) -> unit
val fold : 'a t ->
init:'b -> f:(key:'a -> data:out_value -> 'b -> 'b) -> 'b
val filter : 'a t ->
f:(key:'a -> data:out_value -> bool) -> 'a t
val keys : 'a t -> 'a list
val data : 'a t -> out_value list
val to_alist : 'a t -> ('a * out_value) list
val of_list : ('a * in_value) list -> 'a t
val for_all : 'a t -> f:(out_value -> bool) -> bool
val exists : 'a t -> f:(out_value -> bool) -> bool
val to_map : 'a t -> ('a, out_value) Core.Std.Map.Poly.t
val of_map : ('a, out_value) Core.Std.Map.Poly.t -> 'a t