Module Belt_internalAVLset

type 'value t = 'value node option
and 'value node = {
  1. mutable value : 'value;
  2. mutable height : int;
  3. mutable left : 'value t;
  4. mutable right : 'value t;
}
type ('a, 'b) cmp = ('a, 'b) Belt_Id.cmp
val copy : 'a t -> 'a t
val create : 'a t -> 'a -> 'a t -> 'a t
val bal : 'a t -> 'a -> 'a t -> 'a t
val singleton : 'a -> 'a t
val minimum : 'a t -> 'a option
val minUndefined : 'a t -> 'a Js.undefined
val maximum : 'a t -> 'a option
val maxUndefined : 'a t -> 'a Js.undefined
val removeMinAuxWithRef : 'a node -> 'a Bs_stdlib_mini.ref -> 'a t
val isEmpty : 'a t -> bool
val stackAllLeft : 'a t -> 'a node list -> 'a node list
val forEachU : 'a t -> ('a -> unit) Js.Fn.arity1 -> unit
val forEach : 'a t -> ('a -> unit) -> unit
val reduceU : 'a t -> 'b -> ('b -> 'a -> 'b) Js.Fn.arity2 -> 'b
val reduce : 'a t -> 'b -> ('b -> 'a -> 'b) -> 'b
val everyU : 'a t -> ('a -> bool) Js.Fn.arity1 -> bool
val every : 'a t -> ('a -> bool) -> bool
val someU : 'a t -> ('a -> bool) Js.Fn.arity1 -> bool
val some : 'a t -> ('a -> bool) -> bool
val joinShared : 'a t -> 'a -> 'a t -> 'a t
val concatShared : 'a t -> 'a t -> 'a t
val keepSharedU : 'a t -> ('a -> bool) Js.Fn.arity1 -> 'a t
val keepShared : 'a t -> ('a -> bool) -> 'a t
val keepCopyU : 'a t -> ('a -> bool) Js.Fn.arity1 -> 'a t
val keepCopy : 'a t -> ('a -> bool) -> 'a t
val partitionSharedU : 'a t -> ('a -> bool) Js.Fn.arity1 -> 'a t * 'a t
val partitionShared : 'a t -> ('a -> bool) -> 'a t * 'a t
val partitionCopyU : 'a t -> ('a -> bool) Js.Fn.arity1 -> 'a t * 'a t
val partitionCopy : 'a t -> ('a -> bool) -> 'a t * 'a t
val lengthNode : 'a node -> int
val size : 'a t -> int
val toList : 'a t -> 'a list
val checkInvariantInternal : _ t -> unit

raise when invariant is not held

val fillArray : 'a node -> int -> 'a array -> int
val toArray : 'a t -> 'a array
val fromSortedArrayAux : 'a array -> int -> int -> 'a t
val fromSortedArrayRevAux : 'a array -> int -> int -> 'a t
val fromSortedArrayUnsafe : 'a array -> 'a t
val has : 'a t -> 'a -> cmp:('a, 'b) cmp -> bool
val cmp : 'a t -> 'a t -> cmp:('a, 'b) cmp -> int
val eq : 'a t -> 'a t -> cmp:('a, 'b) cmp -> bool
val subset : 'a t -> 'a t -> cmp:('a, 'b) cmp -> bool
val get : 'a t -> 'a -> cmp:('a, 'b) cmp -> 'a option
val getUndefined : 'a t -> 'a -> cmp:('a, 'b) cmp -> 'a Js.undefined
val getExn : 'a t -> 'a -> cmp:('a, 'b) cmp -> 'a
val fromArray : 'a array -> cmp:('a, 'b) cmp -> 'a t
val addMutate : cmp:('a, 'b) cmp -> 'a t -> 'a -> 'a t
val balMutate : 'a node -> 'a node
val removeMinAuxWithRootMutate : 'a node -> 'a node -> 'a t