Hi Chris,

      If the last parameter of method is a closure, we can write code like
as follows:

someMethod("abc") {
    // this is a closure
}

the above code is equal to

someMethod("abc", {
    // this is a closure
})

As you can see, the former code is much more readable and groovy ;-)

Cheers,
Daniel.Sun






--
Sent from: http://groovy.329449.n5.nabble.com/Groovy-Users-f329450.html

Reply via email to