Module Env (.ml)

module Env: sig .. end
Environment who maps keys whose type is 'a to values of type 'b.

type ('a, 'b) t 
val lookup : ('a, 'b) t -> 'a -> 'b
lookup env k returns the value associated to k or raises Not_found.
val filter : ('a, 'b) t -> ('b -> bool) -> 'b list
filter env pred returns the set of values that verify pred.
val empty : ('a, 'b) t
empty is the environment with no binding at all.
val add : ('a, 'b) t -> 'a -> 'b -> ('a, 'b) t
add env k v associates v to k in env.
val concat : ('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t
concat env env' merges the mapping of env and env' preferring the mapping of env if there is a clash.
val iter : ('a * 'b -> unit) -> ('a, 'b) t -> unit
iter f env iterates over the mappings of env.
val fold_left : ('c -> 'a * 'b -> 'c) -> 'c -> ('a, 'b) t -> 'c
fold f init env iterates over the mappings of env conveying an accumulator whose value is init initially.
val map : ('a * 'b -> 'c) -> ('a, 'b) t -> 'c list
map f env applies a function f on each mapping of env building a list f (k, v).