Module Webs.Dict

module Dict: sig .. end
Dictionaries.

A dictionary is a set of keys mapping to typed values.



Keys


type 'a key 
The type for dictionary keys whose lookup value is 'a.
val key : unit -> 'a key
key () is a new dictionary key.

Dictionaries


type t = Webs.dict 
The type for dictionaries.
val empty : Webs.dict
empty is the empty dictionary.
val is_empty : Webs.dict -> bool
is_empty d is true iff d is empty.
val mem : 'a key -> Webs.dict -> bool
mem k d is true iff k has a mapping in d.
val add : 'a key -> 'a -> Webs.dict -> Webs.dict
add k v d is d with k mapping to v.
val rem : 'a key -> Webs.dict -> Webs.dict
rem k d is d with k unbound.
val find : 'a key -> Webs.dict -> 'a option
find d k is k's mapping in d, if any.
val get : 'a key -> Webs.dict -> 'a
get k d is k's mapping in d.

Raises. Invalid_argument if k is not bound in d.