Module Belt_internalAVLtree

type ('key, 'a) t = ('key, 'a) node option
and ('k, 'v) node = {
  1. mutable key : 'k;
  2. mutable value : 'v;
  3. mutable height : int;
  4. mutable left : ('k, 'v) t;
  5. mutable right : ('k, 'v) t;
}
type ('k, 'id) cmp = ('k, 'id) Belt_Id.cmp
val copy : ('k, 'v) t -> ('k, 'v) t
val create : ('a, 'b) t -> 'a -> 'b -> ('a, 'b) t -> ('a, 'b) t
val bal : ('a, 'b) t -> 'a -> 'b -> ('a, 'b) t -> ('a, 'b) t
val singleton : 'a -> 'b -> ('a, 'b) t
val updateValue : ('k, 'v) node -> 'v -> ('k, 'v) node
val minKey : ('a, 'b) t -> 'a option
val minKeyUndefined : ('a, 'b) t -> 'a Js.undefined
val maxKey : ('a, 'b) t -> 'a option
val maxKeyUndefined : ('a, 'b) t -> 'a Js.undefined
val minimum : ('a, 'b) t -> ('a * 'b) option
val minUndefined : ('a, 'b) t -> ('a * 'b) Js.undefined
val maximum : ('a, 'b) t -> ('a * 'b) option
val maxUndefined : ('a, 'b) t -> ('a * 'b) Js.undefined
val removeMinAuxWithRef : ('a, 'b) node -> 'a Bs_stdlib_mini.ref -> 'b Bs_stdlib_mini.ref -> ('a, 'b) t
val isEmpty : (_, _) t -> bool
val stackAllLeft : ('a, 'b) t -> ('a, 'b) node list -> ('a, 'b) node list
val findFirstByU : ('a, 'b) t -> ('a -> 'b -> bool) Js.Fn.arity2 -> ('a * 'b) option
val findFirstBy : ('a, 'b) t -> ('a -> 'b -> bool) -> ('a * 'b) option
val forEachU : ('a, 'b) t -> ('a -> 'b -> unit) Js.Fn.arity2 -> unit
val forEach : ('a, 'b) t -> ('a -> 'b -> unit) -> unit
val mapU : ('c, 'a) t -> ('a -> 'b) Js.Fn.arity1 -> ('c, 'b) t
val map : ('c, 'a) t -> ('a -> 'b) -> ('c, 'b) t
val mapWithKeyU : ('a, 'b) t -> ('a -> 'b -> 'c) Js.Fn.arity2 -> ('a, 'c) t
val mapWithKey : ('a, 'b) t -> ('a -> 'b -> 'c) -> ('a, 'c) t
val reduceU : ('a, 'b) t -> 'c -> ('c -> 'a -> 'b -> 'c) Js.Fn.arity3 -> 'c
val reduce : ('a, 'b) t -> 'c -> ('c -> 'a -> 'b -> 'c) -> 'c
val everyU : ('a, 'b) t -> ('a -> 'b -> bool) Js.Fn.arity2 -> bool
val every : ('a, 'b) t -> ('a -> 'b -> bool) -> bool
val someU : ('a, 'b) t -> ('a -> 'b -> bool) Js.Fn.arity2 -> bool
val some : ('a, 'b) t -> ('a -> 'b -> bool) -> bool
val join : ('a, 'b) t -> 'a -> 'b -> ('a, 'b) t -> ('a, 'b) t
val concat : ('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t
val concatOrJoin : ('a, 'b) t -> 'a -> 'b option -> ('a, 'b) t -> ('a, 'b) t
val keepSharedU : ('a, 'b) t -> ('a -> 'b -> bool) Js.Fn.arity2 -> ('a, 'b) t
val keepShared : ('a, 'b) t -> ('a -> 'b -> bool) -> ('a, 'b) t
val keepMapU : ('a, 'b) t -> ('a -> 'b -> 'c option) Js.Fn.arity2 -> ('a, 'c) t
val keepMap : ('a, 'b) t -> ('a -> 'b -> 'c option) -> ('a, 'c) t
val partitionSharedU : ('a, 'b) t -> ('a -> 'b -> bool) Js.Fn.arity2 -> ('a, 'b) t * ('a, 'b) t
val partitionShared : ('a, 'b) t -> ('a -> 'b -> bool) -> ('a, 'b) t * ('a, 'b) t
val lengthNode : ('a, 'b) node -> int
val size : ('a, 'b) t -> int
val toList : ('a, 'b) t -> ('a * 'b) list
val checkInvariantInternal : ('a, 'b) t -> unit

raise when invariant is not held

val fillArray : ('a, 'b) node -> int -> ('a * 'b) array -> int
val toArray : ('a, 'b) t -> ('a * 'b) array
val keysToArray : ('a, 'b) t -> 'a array
val valuesToArray : ('a, 'b) t -> 'b array
val fromSortedArrayAux : ('a * 'b) array -> int -> int -> ('a, 'b) t
val fromSortedArrayRevAux : ('a * 'b) array -> int -> int -> ('a, 'b) t
val fromSortedArrayUnsafe : ('a * 'b) array -> ('a, 'b) t
val cmpU : ('a, 'b) t -> ('a, 'c) t -> kcmp:('a, _) cmp -> vcmp:('b -> 'c -> int) Js.Fn.arity2 -> int
val cmp : ('a, 'b) t -> ('a, 'c) t -> kcmp:('a, _) cmp -> vcmp:('b -> 'c -> int) -> int
val eqU : ('a, 'b) t -> ('a, 'c) t -> kcmp:('a, _) cmp -> veq:('b -> 'c -> bool) Js.Fn.arity2 -> bool
val eq : ('a, 'b) t -> ('a, 'c) t -> kcmp:('a, _) cmp -> veq:('b -> 'c -> bool) -> bool
val get : ('a, 'b) t -> 'a -> cmp:('a, _) cmp -> 'b option
val getUndefined : ('a, 'b) t -> 'a -> cmp:('a, _) cmp -> 'b Js.undefined
val getWithDefault : ('a, 'b) t -> 'a -> 'b -> cmp:('a, _) cmp -> 'b
val getExn : ('a, 'b) t -> 'a -> cmp:('a, _) cmp -> 'b
val has : ('a, 'b) t -> 'a -> cmp:('a, _) cmp -> bool
val fromArray : ('a * 'b) array -> cmp:('a, 'id) cmp -> ('a, 'b) t
val updateMutate : ('a, 'b) t -> 'a -> 'b -> cmp:('a, 'id) cmp -> ('a, 'b) t
val balMutate : ('a, 'b) node -> ('a, 'b) node
val removeMinAuxWithRootMutate : ('a, 'b) node -> ('a, 'b) node -> ('a, 'b) t