indexMap<T, U> function
A map
function that calls the function with an enumeration as well as the
value.
Implementation
Iterable<U> indexMap<T, U>(
Iterable<T> iterable, U Function(int index, T value) func) sync* {
int index = 0;
for (final T value in iterable) {
yield func(index, value);
++index;
}
}