Groovy web console

subscribe to the feed Subscribe
to this
site
Opcional operators/symbols and Groovy DSL (via #groovywebconsole)
tweet this snippet Tweet
this
script

Opcional operators/symbols and Groovy DSL

Published 8 months ago by Daniel
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
def abc = {arg ->
    println "abc = ${arg.getClass()}"
    println ''
}

def xyz = {params, closure ->
   println "xyz = ${params.getClass()}"
   println "xyz = ${closure.getClass()}"
   println ''
}




abc([a: 1, b: 2])
abc(a: 1, b: 2)
abc a: 1, b: 2



xyz(a: 1){
   println 'Groovy'
}
xyz a: 1, {println 'web console'}