Groovy web console

subscribe to the feed Subscribe
to this
site
closure-test (via #groovywebconsole)
tweet this snippet Tweet
this
script

closure-test

Published 2 months ago by Daniel with tags closure
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
def foo(Closure c) {
    c(arg1: "baz", arg2:"qux")
}

def bar(Map args) {
    println('arg1: ' + args['arg1'])
    println('arg2: ' + args['arg2'])
}

foo(bar)