static int smartIndexOfNot(L l, A sub) { ret smartIndexOfNot(l, sub, 0); } static int smartIndexOfNot(L l, A sub, int start) { int i = start, n = l(l); while (i < n && eq(l.get(i), sub)) ++i; ret i; }