type 'a keyThe type for keys whose lookup value is of type 'a.
module Key : sig ... endKeys.
type tThe type for heterogeneous value maps.
val empty : tempty is the empty map.
val is_empty : t -> boolis_empty m is true iff m is empty.
val mem : 'a key -> t -> boolmem k m is true iff k is bound in m.
val add : 'a key -> 'a -> t -> tadd k v m is m with k bound to v.
val singleton : 'a key -> 'a -> tsingleton k v is add k v empty.
val rem : 'a key -> t -> trem k m is m with k unbound.
val find : 'a key -> t -> 'a optionfind k m is the value of k's binding in m, if any.
val get : 'a key -> t -> 'aget k m is the value of k's binding in m.
- raises Invalid_argument
if k is not bound in m.
type binding = The type for bindings.
val iter : (binding -> unit) -> t -> unititer f m applies f to all bindings of m.
val fold : (binding -> 'a -> 'a) -> t -> 'a -> 'afold f m acc folds over the bindings of m with f, starting with acc
val for_all : (binding -> bool) -> t -> boolfor_all p m is true iff all bindings of m satisfy p.
val exists : (binding -> bool) -> t -> boolexists p m is true iff there exists a bindings of m that satisfies p.
val filter : (binding -> bool) -> t -> tfilter p m are the bindings of m that satisfy p.
val cardinal : t -> intcardinal m is the number of bindings in m.
val any_binding : t -> binding optionany_binding m is a binding of m (if not empty).
val get_any_binding : t -> bindingget_any_binding m is a binding of m.
- raises Invalid_argument
if m is empty.
module type KEY_INFO = sig ... endThe type for key information.
module type S = sig ... endOutput signature of the functor Make
module Make : functor (Key_info : KEY_INFO) -> S with type 'a Key.info = 'a Key_info.tFunctor for heterogeneous maps whose keys hold information of type Key_info.t