Module Prime_accretion_map.MakeG

Accretion map of a monomorphic monoid type with an explicit generator.

Parameters

Signature

type key = Key.t
type elt = Elt.generator
type result = Elt.t
type t
val empty : t
val singleton : key -> elt -> t
val is_empty : t -> bool
val cardinal : t -> int
val result : t -> result
val app : t -> key -> elt option
val find : key -> t -> elt
val add : key -> elt -> t -> t
val remove : key -> t -> t
val bindings : t -> (key * elt) list
val fold : (key -> elt -> 'a -> 'a) -> t -> 'a -> 'a
val iter : (key -> elt -> unit) -> t -> unit
val for_all : (key -> elt -> bool) -> t -> bool
val exists : (key -> elt -> bool) -> t -> bool