Makes sense. I started reading about closures before I posted, and will
keep reading.

On Fri, May 25, 2018 at 9:58 AM Daniel.Sun <sun...@apache.org> wrote:

> 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