Module Core_extended__Fold_map.Make

Builds a fold_map

Parameters

Signature

type in_value = Fold.data

The type of the values being fold over.

type out_value = Fold.t

The type of the accumulator

type 'key t = private ('keyout_valueCore.Map.Poly.t
type 'a _in_value = in_value
type 'a _out_value = out_value
type ('a, 'b) _t = 'a t
val empty : _ t

A map containing no bindings

val singleton : 'a ‑> in_value ‑> 'a t
val is_empty : _ t ‑> bool
val length : _ 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_keys : 'a t ‑> f:('a ‑> unit) ‑> unit
val iter : 'a t ‑> f:(out_value ‑> unit) ‑> unit
val iteri : '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_keys : 'a t ‑> f:('a ‑> bool) ‑> 'a t
val filter : 'a t ‑> f:(out_value ‑> bool) ‑> 'a t
val filteri : 'a t ‑> f:(key:'a ‑> data:out_value ‑> bool) ‑> 'a t
val keys : 'a t ‑> 'a list
val data : _ t ‑> out_value list
val to_alist : ?⁠key_order:[ `Increasing | `Decreasing ] ‑> 'a t ‑> ('a * out_value) list
val of_list : ('a * in_value) list ‑> 'a t
val for_all : _ t ‑> f:(out_value ‑> bool) ‑> bool
val exists : _ t ‑> f:(out_value ‑> bool) ‑> bool
val to_map : 'a t ‑> ('aout_valueCore.Map.Poly.t
val of_map : ('aout_valueCore.Map.Poly.t ‑> 'a t