static int indexOfPred(L l, O pred) { for i over l: if (checkCondition(pred, l.get(i))) ret i; ret -1; } static int indexOfPred(L l, IF1 pred) { ret indexOfPred(l, (O) pred); }