Skip to content

Instantly share code, notes, and snippets.

@kdabir
Last active July 23, 2016 15:21
Show Gist options
  • Save kdabir/2762107 to your computer and use it in GitHub Desktop.
Save kdabir/2762107 to your computer and use it in GitHub Desktop.
Closures as Varargs in groovy
def hello (...c) {
c.each {it.call()}
}
hello ({println 'hello'},{println 'namaste'}, {println 'hola'})
@kdabir
Copy link
Author

kdabir commented Jul 23, 2016

@fmamud thanks for catching that. Update the gist :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment