mapIndexed<E, T> method

Iterable<E> mapIndexed<E, T>(
  1. E f(
    1. int index,
    2. T item
    )
)

Implementation

Iterable<E> mapIndexed<E, T>(E Function(int index, T item) f) sync* {
  int index = 0;
  for (final T item in this) {
    yield f(index, item);
    index = index + 1;
  }
}