Module Belt_internalAVLset

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

raise when invariant is not held

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