mapIndexed<E> method

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

Implementation

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