package dolmen

  1. Overview
  2. Docs

Parameters

module Ord : Stdlib.Map.OrderedType

Signature

type 'a t
val empty : _ t
val find_exn : Ord.t -> 'a t -> 'a

Exception-raising find function.

  • raises Not_found
val find_opt : Ord.t -> 'a t -> 'a option

Option-returning find function.

val add : Ord.t -> 'a -> 'a t -> 'a t

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

val find_add : Ord.t -> ('a option -> 'a) -> 'a t -> 'a t

Update the value bound to a key.

val iter : (Ord.t -> 'a -> unit) -> 'a t -> unit

Iter on the map.

val fold : (Ord.t -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

Fold on the map.

OCaml

Innovation. Community. Security.