static int indexOfLastChange(L l) { for (int i = l(l)-1; i > 0; i--) if (neq(l.get(i-1), l.get(i))) ret i; ret -1; }