enumerate<T> function
Performs like forEach
but invokes func
with an enumeration.
Implementation
void enumerate<T>(Iterable<T> iterable, void Function(int, T) func) {
int count = 0;
for (final T value in iterable) {
func(count, value);
++count;
}
}