static L mapWithIndex(L l, IF2 f) { L out = emptyList(l); for i over l: out.add(f.get(l.get(i), i)); ret out; }