forEachIndexed method
Usage: list.forEachIndexed((index, item) => print('$index: $item'))
Implementation
void forEachIndexed(void Function(int index, T element) action) {
int index = 0;
for (final element in this) {
action(index++, element);
}
}