> Couldn't reduce return a list just through concatenating its elements? For > instance: > > @a = (1,3,2,4,3,6,4,8); > @sum = reduce( (^total, ^x+^y ), @a ); # (4,6,9,12) Currying placeholders are scalars, so you want: @sum = @{reduce (@^total, ^x+^y ), [], @a }; More and more I lean towards a scalar-only reduce. Simpler semantics and you can always ref a L(OL(OL(OL...etc.))) if you need multidimensionals. Damian
- Re: RFC 76 (v1) Builtin: reduce Ariel Scolnicov
- Re: RFC 76 (v1) Builtin: reduce Bart Lateur
- Re: RFC 76 (v1) Builtin: reduc... Graham Barr
- Re: RFC 76 (v1) Builtin: reduc... John Porter
- Re: RFC 76 (v1) Builtin: reduce Graham Barr
- Re: RFC 76 (v1) Builtin: reduce Chaim Frenkel
- Re: RFC 76 (v1) Builtin: reduce Damian Conway
- Re: RFC 76 (v1) Builtin: reduce Damian Conway
- Re: RFC 76 (v1) Builtin: reduce Damian Conway
- Re: RFC 76 (v1) Builtin: reduce Jeremy Howard
- Re: RFC 76 (v1) Builtin: reduce Damian Conway
- Re: RFC 76 (v1) Builtin: reduce Glenn Linderman
- Re: RFC 76 (v1) Builtin: reduce Damian Conway
- Re: RFC 76 (v1) Builtin: reduce John Porter
- Re: RFC 76 (v1) Builtin: reduce Piers Cawley
- Re: RFC 76 (v1) Builtin: reduce Graham Barr
- Re: RFC 76 (v1) Builtin: reduce Damian Conway
- Re: RFC 76 (v1) Builtin: reduce Adam Krolnik
- Re: RFC 76 (v1) Builtin: reduce Jarkko Hietaniemi
- Re: RFC 76 (v1) Builtin: reduce Nathan Wiger
- Re: RFC 76 (v1) Builtin: reduce Piers Cawley