Up

Module type S

Output signature of the functor Make

Signature

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 : _ 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 : 'a t -> f:(key:'a -> data: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 : 'a t -> f:(key:'a -> data: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 -> ('a, out_value) Core.Std.Map.Poly.t
val of_map : ('a, out_value) Core.Std.Map.Poly.t -> 'a t