package dolmen

  1. Overview
  2. Docs

Module Const.MapSource

Maps of term constants.

Sourcetype key = t
Sourcetype 'a t
Sourceval empty : _ t

The empty map

Sourceval find_exn : key -> 'a t -> 'a

Exception-raising find function.

Sourceval find_opt : key -> 'a t -> 'a option

Option-returning find function.

Sourceval add : key -> 'a -> 'a t -> 'a t

Add a new binding, shadowing any earlier binding to the same key.

Sourceval find_add : key -> ('a option -> 'a) -> 'a t -> 'a t

Update the value bound to a key.

Sourceval iter : (key -> 'a -> unit) -> 'a t -> unit

Iter on the map.

Sourceval fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

Fold on the map.