package colibri2

  1. Overview
  2. Docs
type 'a key = 'a t
type 'b t
val empty : 'b t
val is_empty : 'b t -> bool
val set_submap : 'a t -> 'b t -> bool
val singleton : 'a key -> 'b -> 'b t
val find : 'a key -> 'b t -> 'b

find x m returns the current binding of x in m, or raises Not_found if no such binding exists.

val find_def : 'b -> 'a key -> 'b t -> 'b
val find_opt : 'a key -> 'b t -> 'b option
val find_exn : exn -> 'a key -> 'b t -> 'b
val add : 'a key -> 'b -> 'b t -> 'b t

add x y m returns a map containing the same bindings as m, plus a binding of x to y. If x was already bound in m, its previous binding disappears.

val change : ('b option -> 'b option) -> 'a key -> 'b t -> 'b t
val add_change : ('c -> 'b) -> ('c -> 'b -> 'b) -> 'a key -> 'c -> 'b t -> 'b t
type 'b union = {
  1. union : 'a. 'a key -> 'b -> 'b -> 'b option;
}
val union : 'b union -> 'b t -> 'b t -> 'b t
type 'b iter = {
  1. iter : 'a. 'a key -> 'b -> unit;
}
val iter : 'b iter -> 'b t -> unit
type ('b, 'c) fold = {
  1. fold : 'a. 'c -> 'a key -> 'b -> 'c;
}
val fold : ('b, 'c) fold -> 'c -> 'b t -> 'c
type 'b mapi = {
  1. mapi : 'a. 'a key -> 'b -> 'b;
}
val mapi : 'b mapi -> 'b t -> 'b t
type printk = {
  1. printk : 'a. 'a key Containers.Format.printer;
}
val pp : unit Containers.Format.printer -> unit Containers.Format.printer -> printk -> 'b Containers.Format.printer -> 'b t Containers.Format.printer
OCaml

Innovation. Community. Security.