forEach3<Y> method
foreach with the iterable being looped given to you in the transformer.
forEach3 is the same as forEach but with the index given to you in the transformer
Implementation
void forEach3<Y>(
final void Function(T value, int index, Iterable<T> list) transformer,
) {
int index = 0;
forEach((final T item) {
transformer(item, index, take(length));
index = index + 1;
});
}