Skip to content

Instantly share code, notes, and snippets.

@nwillc
Created May 30, 2018 01:33
Show Gist options
  • Save nwillc/f63e376f0d88bc80904c86fb609b00c5 to your computer and use it in GitHub Desktop.
Save nwillc/f63e376f0d88bc80904c86fb609b00c5 to your computer and use it in GitHub Desktop.
Second attempt at forEach
inline fun NodeList.forEach(block: Node.() -> Unit) {
for (i in 0 .. (length - 1)) {
item(i).block()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment