mapIndexed<R> method
Null safety
- R convert(
- int index,
- T element
Maps each element and its index to a new value.
Implementation
Iterable<R> mapIndexed<R>(R Function(int index, T element) convert) sync* {
var index = 0;
for (var element in this) {
yield convert(index++, element);
}
}