Groovy web console

subscribe to the feed Subscribe
to this
site
You dirty bastards (via #groovywebconsole)
tweet this snippet Tweet
this
script

You dirty bastards

Published 2 months ago by tvn
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
def g(String name, Closure c) {
  println("Executing ${name}")
  c()
  println("Finished ${name}")
}

g('foo') {
 println("Foobar")
}