Up

Module Total_map = Total_map

Signature

type ('key, 'a, 'cmp, 'enum) t = private ('key, 'a, 'cmp) Std_internal.Map.t
val to_map : ('key, 'a, 'cmp, _) t -> ('key, 'a, 'cmp) Std_internal.Map.t

Many of the functions below have types reflecting the fact that the maps are total (e.g., find does not return an option). The fact that they won't raise exceptions relies on the enumeration passed to Make being complete.

val map : ('key, 'a, 'c, 'e) t -> f:('a -> 'b) -> ('key, 'b, 'c, 'e) t
val mapi : ('key, 'a, 'c, 'e) t -> f:(key:'key -> data:'a -> 'b) -> ('key, 'b, 'c, 'e) t
val map2 : ('key, 'a, 'cmp, 'enum) t -> ('key, 'b, 'cmp, 'enum) t -> f:('a -> 'b -> 'c) -> ('key, 'c, 'cmp, 'enum) t
val iter : ('key, 'a, _, _) t -> f:(key:'key -> data:'a -> unit) -> unit
val iteri : ('key, 'a, _, _) t -> f:(key:'key -> data:'a -> unit) -> unit
val iter2 : ('key, 'a, 'cmp, 'enum) t -> ('key, 'b, 'cmp, 'enum) t -> f:(key:'key -> 'a -> 'b -> unit) -> unit
val set : ('key, 'a, 'cmp, 'enum) t -> 'key -> 'a -> ('key, 'a, 'cmp, 'enum) t
val to_alist : ?key_order:[
| `Increasing
| `Decreasing
] -> ('key, 'a, _, _) t -> ('key * 'a) list
val find : ('key, 'a, _, _) t -> 'key -> 'a
val change : ('key, 'a, 'c, 'e) t -> 'key -> f:('a -> 'a) -> ('key, 'a, 'c, 'e) t
module Sequence (A : Std_internal.Applicative) : sig .. end
Sequence a total map of computations in order of their keys resulting in computation of the total map of results.

The only reason that the Applicative interface isn't included here is that we don't have an Applicative.S3.

module type Key = sig .. end
module type S = sig .. end
module Make (Key : Key) : S with module Key = Key
module Make_using_comparator (Key : sig .. end) : S with module Key = Key with type comparator_witness = Key.comparator_witness