// old syntax static L filterListByPredicateOnIndex(O pred, L l) { new L out; int n = l(l); for i to n: if (isTrue_callF(pred, i)) out.add(l.get(i)); ret out; } static L lambdaMapLike filterListByPredicateOnIndex(IIntPred pred, L l) { new L out; int n = l(l); for i to n: if (pred.get(i)) out.add(l.get(i)); ret out; } static L filterListByPredicateOnIndex(L l, IIntPred pred) { ret filterListByPredicateOnIndex(pred, l); }