Module type Gist.MAP

Map interface.

type t

The type for maps.

type key

The type for map keys.

type value

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