Up

Module type Creators1

Signature

type 'a t
type 'a tree
type key
val empty : _ t
val singleton : key -> 'a -> 'a t
val of_alist : (key * 'a) list -> [
| `Ok of 'a t
| `Duplicate_key of key
]
val of_alist_or_error : (key * 'a) list -> 'a t Or_error.t
val of_alist_exn : (key * 'a) list -> 'a t
val of_alist_multi : (key * 'a) list -> 'a list t
val of_alist_fold : (key * 'a) list -> init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce : (key * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array : (key * 'a) array -> 'a t Or_error.t
val of_sorted_array_unchecked : (key * 'a) array -> 'a t
val of_tree : 'a tree -> 'a t