groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mario Garcia <mario.g...@gmail.com>
Subject Re: groovy git commit: Add missing concat methods of tuples
Date Mon, 26 Nov 2018 18:29:22 GMT
I'd do it if the intention is to enforce immutability of tuples, like
"...any operation applied to a tuple should result in a new tuple"

Regards
Mario

El lun., 26 nov. 2018 15:44, Paul King <paul.king.asert@gmail.com> escribió:

> On Tue, Nov 27, 2018 at 12:34 AM <sunlan@apache.org> wrote:
> >
> > Repository: groovy
> > Updated Branches:
> >   refs/heads/master aa372c484 -> b6933c7ef
> >
> >
> > Add missing concat methods of tuples
> [SNIP]
> >      /**
> >       * Concatenate a tuple to this tuple.
> >       */
> > +    public final Tuple1<T1> concat(Tuple0 tuple) {
> > +        return new Tuple1<>(v1);
> > +    }
> [SNIP]
>
> Returning a new tuple is important? Vs returning this?
>
> Cheers, Paul.
>

Mime
View raw message