Module Maplike.Map_module_of_map

Map_module_of_map (V) (M) is a map module for standard library map M with value of type V.


module V : VALUE
module M : Stdlib.Map.S


type t = V.t M.t

The type for maps.

type key = M.key

The type for map keys.

type value = V.t

The type for map values.

val empty : t

empty is an empty map.

val mem : key -> t -> bool

mem k m is true iff m has a binding for k.

val add : key -> value -> t -> t

add k v m is m with k binding to v.

val remove : key -> t -> t

remove k m is m without a binding for k.

val find_opt : key -> t -> value option

find_opt k m is the binding for key k in m (if any).

val fold : (key -> value -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f m init folds over the bindings of m with f starting with init.

val equal : t -> t -> bool

equal eq m0 m1 tests whether m0 and m1 contain equal keys and associate them with equal values.

val compare : t -> t -> int

compare cmp m0 m1 totally order m0 and m1 with cmp used to compare the value of equal keys.

val type_gist_name : string

type_gist_name is a name for the representation