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