Index and loop it through callback.
callback
Iterable<T> index(T Function(T item, int index) callback) { int i = 0; for (final tmp in this) { callback(tmp, i); i++; } return this; }