static L lambdaMapLike indicesOfPred(IPred f, L l) { if (l == null) null; new L x; int n = l(l); for i to n: if (f.get(l.get(i))) x.add(i); ret x; } static L indicesOfPred(L l, IPred f) { ret indicesOfPred(f, l); }