static O smallestList_add(O l, O o) { if (l == null) ret o; if (l cast Pair) ret triple(l.a, l.b, o); if (l cast T3) ret new O[] {l.a, l.b, l.c, o}; if (l cast O[]) ret addToObjectArray(l, o); ret pair(l, o); }