onEachIndexed method
Performs the given action on each element, providing sequential index with the element, and returns the collection itself afterwards.
Implementation
KtIterable<T> onEachIndexed(void Function(int index, T item) action) {
  var index = 0;
  for (final item in iter) {
    action(index++, item);
  }
  return this;
}