Library
Module
Module type
Parameter
Class
Class type
Functor for heterogenous maps whose keys are provided by Key
.
type 'a key = 'a Key.t
The type for keys whose lookup value is 'a
.
val empty : t
empty
is the empty map.
singleton key value
creates a map with the single provided binding.
val is_empty : t -> bool
is_empty t
is true
if the map is empty, false
otherwise.
val cardinal : t -> int
cardinal t
is the number of bindings in t
.
find key t
is the value Some value
of key
in t
, None
if key
is not bound in t
.
findv key t
is the binding Some v
of key
in t
, None
if key
is not bound in t
.
equal p t t'
is true
if all bindings of t
and t'
satisfy p
fold f t acc
folds over the bindings of t
with f
, starting with acc
.
for_all p t
is true
if all bindings in t
satisfy p
, false
otherwise.
exists p t
is true
if some binding in t
satisfies p
, false
otherwise.
merge f t t'
merges t
and t'
by using the result of f
for every binding.
union f t t'
is the union of t
and t'
. If the same binding is defined in both maps, the result of f
is used.
val pp : Format.formatter -> t -> unit
pp fmt t
is a pretty printer of the map t
.