Instantly share code, notes, and snippets.

What would you like to do?
* Performs the given [action] on each element.
public header inline fun <T> Iterable<T>.forEach(action: (T) -> Unit): Unit
* Performs the given [action] on each element, providing sequential index with the element.
* @param [action] function that takes the index of an element and the element itself
* and performs the desired action on the element.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment