public static int depth (InspectableTree T, Position v) { if (T.isRoot(v)) return 0; else return 1 + depth(T, T.parent(v)); }