#pragma once
#include "avl.h"

// functions that really shouldn't be exposed, but are to reduce compilation time

// attempt to fix the tree, if necessary
forall(otype K | Comparable(K), otype V)
tree(K, V) * tryFix(tree(K, V) * t);

// sets parent field of c to be p
forall(otype K | Comparable(K), otype V)
void setParent(tree(K, V) * c, tree(K, V) * p);

forall(otype K | Comparable(K), otype V)
int height(tree(K, V) * t);
