sig
type 'a injection
val create_inj : unit -> 'a CCMixmap.injection
module type S =
sig
type key
type t
val empty : CCMixmap.S.t
val get :
inj:'a CCMixmap.injection ->
CCMixmap.S.key -> CCMixmap.S.t -> 'a option
val add :
inj:'a CCMixmap.injection ->
CCMixmap.S.key -> 'a -> CCMixmap.S.t -> CCMixmap.S.t
val find :
inj:'a CCMixmap.injection -> CCMixmap.S.key -> CCMixmap.S.t -> 'a
val cardinal : CCMixmap.S.t -> int
val remove : CCMixmap.S.key -> CCMixmap.S.t -> CCMixmap.S.t
val mem :
inj:'a CCMixmap.injection -> CCMixmap.S.key -> CCMixmap.S.t -> bool
val iter_keys : f:(CCMixmap.S.key -> unit) -> CCMixmap.S.t -> unit
val fold_keys :
f:('a -> CCMixmap.S.key -> 'a) -> x:'a -> CCMixmap.S.t -> 'a
type 'a sequence = ('a -> unit) -> unit
val keys_seq : CCMixmap.S.t -> CCMixmap.S.key CCMixmap.S.sequence
val bindings_of :
inj:'a CCMixmap.injection ->
CCMixmap.S.t -> (CCMixmap.S.key * 'a) CCMixmap.S.sequence
type value =
Value : ('a CCMixmap.injection -> 'a option) -> CCMixmap.S.value
val bindings :
CCMixmap.S.t ->
(CCMixmap.S.key * CCMixmap.S.value) CCMixmap.S.sequence
end
module type ORD =
sig type t val compare : CCMixmap.ORD.t -> CCMixmap.ORD.t -> int end
module Make :
functor (X : ORD) ->
sig
type key = X.t
type t
val empty : t
val get : inj:'a injection -> key -> t -> 'a option
val add : inj:'a injection -> key -> 'a -> t -> t
val find : inj:'a injection -> key -> t -> 'a
val cardinal : t -> int
val remove : key -> t -> t
val mem : inj:'a injection -> key -> t -> bool
val iter_keys : f:(key -> unit) -> t -> unit
val fold_keys : f:('a -> key -> 'a) -> x:'a -> t -> 'a
type 'a sequence = ('a -> unit) -> unit
val keys_seq : t -> key sequence
val bindings_of : inj:'a injection -> t -> (key * 'a) sequence
type value = Value : ('a injection -> 'a option) -> value
val bindings : t -> (key * value) sequence
end
end