static int smallestList_indexOf(O l, O o) { if (l == null) ret -1; if (l cast Pair) ret eq(l.a, o) ? 0 : eq(l.b, o) ? 1 : -1; if (l cast T3) ret eq(l.a, o) ? 0 : eq(l.b, o) ? 1 : eq(l.c, o) ? 2 : -1; if (l cast O[]) ret indexOf(l, o); ret eq(l, o) ? 0 : -1; }