Module Okasakimap.MakeWithKey

Parameters

module Key : sig ... end

Signature

include S with type key = Key.t
type 'a t
type key = Key.t
val empty : 'a t
val singleton : key -> 'a -> 'a t
val find : key -> 'a t -> 'a
val find_opt : key -> 'a t -> 'a option
val remove : key -> 'a t -> 'a t
val insert : (old:'a -> value:'a -> 'a) -> key -> 'a -> 'a t -> 'a t
val add : key -> 'a -> 'a t -> 'a t
val cardinal : 'a t -> int
val map : ('a -> 'b) -> 'a t -> 'b t
val mapi : (int -> 'a -> 'b) -> 'a t -> 'b t
val min_elt : 'a t -> int * 'a
val max_elt : 'a t -> int * 'a
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val unioni : (int -> 'a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
val interi : (int -> 'a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
val interi_filter : (int -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t
val union : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
val inter : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
val is_singleton : 'a t -> 'a option
val iter : (Key.t -> 'a -> unit) -> 'a t -> unit
val fold : (Key.t -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val to_list : 'a t -> (Key.t * 'a) list