functor (X : KEY) ->
sig
type key = X.t
type +'a t
val empty : 'a t
val is_empty : 'a t -> bool
val singleton : key -> 'a -> 'a t
val mem : key -> 'a t -> bool
val get : key -> 'a t -> 'a option
val get_exn : key -> 'a t -> 'a
val nth : int -> 'a t -> (key * 'a) option
val nth_exn : int -> 'a t -> key * 'a
val add : key -> 'a -> 'a t -> 'a t
val remove : key -> 'a t -> 'a t
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t
val cardinal : 'a t -> int
val weight : 'a t -> int
val fold : f:('b -> key -> 'a -> 'b) -> x:'b -> 'a t -> 'b
val mapi : f:(key -> 'a -> 'b) -> 'a t -> 'b t
val map : f:('a -> 'b) -> 'a t -> 'b t
val iter : f:(key -> 'a -> unit) -> 'a t -> unit
val split : key -> 'a t -> 'a t * 'a option * 'a t
val merge :
f:(key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> 'c t
val extract_min : 'a t -> key * 'a * 'a t
val extract_max : 'a t -> key * 'a * 'a t
val choose : 'a t -> (key * 'a) option
val choose_exn : 'a t -> key * 'a
val random_choose : Random.State.t -> 'a t -> key * 'a
val add_list : 'a t -> (key * 'a) list -> 'a t
val of_list : (key * 'a) list -> 'a t
val to_list : 'a t -> (key * 'a) list
val add_seq : 'a t -> (key * 'a) sequence -> 'a t
val of_seq : (key * 'a) sequence -> 'a t
val to_seq : 'a t -> (key * 'a) sequence
val add_gen : 'a t -> (key * 'a) gen -> 'a t
val of_gen : (key * 'a) gen -> 'a t
val to_gen : 'a t -> (key * 'a) gen
val print : key printer -> 'a printer -> 'a t printer
val node_ : key -> 'a -> 'a t -> 'a t -> 'a t
val balanced : 'a t -> bool
end