groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Fouts <chrisfo...@ziftsolutions.com>
Subject Re: Help with Groovy syntax
Date Fri, 25 May 2018 14:00:02 GMT
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 <sunlan@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
>

Mime
View raw message