static int smartIndexOfPred(L l, IPred pred) { ret smartIndexOfPred(l, pred, 0); } static int smartIndexOfPred(L l, IPred pred, int i) { int n = l(l); for (; i < n; i++) if (pred.get(l.get(i))) ret i; ret n; }