map3<Y> method

Iterable<Y> map3<Y>(
  1. Y transformer(
    1. T value,
    2. int index,
    3. Iterable<T> list
    )
)

map an iterable with the iterable given to you in the transformer

map3 is the same as map but with the index given to you in the transformer

Implementation

Iterable<Y> map3<Y>(
  final Y Function(T value, int index, Iterable<T> list) transformer,
) {
  int index = 0;
  return map((final T item) {
    return transformer(item, index++, take(length));
  });
}