static int smartIndexOfSubList(L x, L y) {
ret smartIndexOfSubList(x, y, 0);
}
static int smartIndexOfSubList(L x, L y, int i) {
outer: for (; i+l(y) <= l(x); i++) {
for (int j = 0; j < l(y); j++)
if (neq(x.get(i+j), y.get(j)))
continue outer;
break;
}
ret i;
}
static int smartIndexOfSubList(L x, A[] y, int i) {
outer: for (; i+l(y) <= l(x); i++) {
for (int j = 0; j < l(y); j++)
if (neq(x.get(i+j), y[j]))
continue outer;
break;
}
ret i;
}