mapIndexed<R> method
Maps elements with their indices to a new Iterable.
Implementation
Iterable<R> mapIndexed<R>(R Function(int index, T element) transform) sync* {
var index = 0;
for (final element in this) {
yield transform(index++, element);
}
}