map2<Y> method
normal map function with the current index given to you in the transformer
map2 is the same as map but with the index given to you in the transformer
Implementation
Iterable<Y> map2<Y>(final Y Function(T value, int index) transformer) {
int index = 0;
return map((final T item) {
return transformer(item, index++);
});
}