expandIndexed<R> method
Expands each element and index to a number of elements in a new iterable.
Implementation
Iterable<R> expandIndexed<R>(
Iterable<R> Function(int index, T element) expand) sync* {
var index = 0;
for (var element in this) {
yield* expand(index++, element);
}
}