package dolmen

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type 'a key = 'a id

Polymorphic type of keys for the a subtitution

val get : 'a key -> ('a key, 'b) t -> 'b

get v subst returns the value associated with v in subst, if it exists.

  • raises Not_found

    if there is no binding for v.

val mem : 'a key -> ('a key, 'b) t -> bool

get v subst returns wether there is a value associated with v in subst.

val bind : ('a key, 'b) t -> 'a key -> 'b -> ('a key, 'b) t

bind v t subst returns the same substitution as subst with the additional binding from v to t. Erases the previous binding of v if it exists.

val remove : 'a key -> ('a key, 'b) t -> ('a key, 'b) t

remove v subst returns the same substitution as subst except for v which is unbound in the returned substitution.