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