static int lastIndexOfPred(L l, IF1 pred) { if (l == null) ret -1; for (int i = l(l)-1; i >= 0; i--) if (pred.get(l.get(i))) ret i; ret -1; }