mapIndexed<R> method
Returns a new lazy Iterable containing the results of applying the
given transform
function to each element and its index in the original
collection.
Implementation
Iterable<R> mapIndexed<R>(R Function(int index, E) transform) sync* {
var index = 0;
for (var element in this) {
yield transform(index++, element);
}
}