List<T> mapIndex<T>(T f(int index, E e)) { List<T> result = <T>[]; this.forIndex((element, index) { T t = f(index, element); result.add(t); }); return result; }