extension ExtraIterators on Iterable { Iterable mapWithIndex(T f(E e, int i)) { var i = 0; return map((e) => f(e, i++)); } }