groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paolo Di Tommaso <paolo.ditomm...@gmail.com>
Subject Re: DGM for first or default
Date Thu, 18 Oct 2018 16:48:22 GMT
-1, it can be easily done as:

list.first() ?: defaultValue


p

On Thu, Oct 18, 2018 at 6:45 PM Daniel.Sun <sunlan@apache.org> wrote:

> +0 from me.
> P.S. we should add similar DGM for `last` too?
>
> Cheers,
> Daniel.Sun
>
>
>
>
> -----
> Daniel Sun
> Apache Groovy committer
> Blog: http://blog.sunlan.me
> Twitter: @daniel_sun
>
> --
> Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html
>

Mime
View raw message