Larry Wall wrote: > Jarkko Hietaniemi writes: > : > > (Yes, there is a small aesthetic edge in using $a vs $_[0], but I still > : > > consider the $ and $b to be warts.) > : > > > : > And anyhow, this will work just fine (see RFC 23): > : > > : > $sum = reduce ^a + ^b, @numbers; > : > : I have been amply reminded of this, thanks :-) (Too little time > : to spend on RFCs...) > > Yes, but has anyone pointed out that > > @out = sort ^b cmp ^a, @in; > > won't do what people will certainly think it ought to? > Except that Perl 6 people will know all about numbered parameters, so they will write: @out = sort ^2 cmp ^1, @in; and it will work just as they expect! (See RFC 23 for information about how numbered, named, and anonymous placeholders get filled in).
- Re: RFC 76 (v1) Builtin: reduce Nathan Torkington
- Re: RFC 76 (v1) Builtin: reduce Jeremy Howard
- Re: RFC 76 (v1) Builtin: reduc... Bart Lateur
- Re: RFC 76 (v1) Builtin: reduc... Jeremy Howard
- Re: RFC 76 (v1) Builtin: reduc... Damian Conway
- Re: RFC 76 (v1) Builtin: reduce Ariel Scolnicov
- Re: RFC 76 (v1) Builtin: reduce Jeremy Howard
- Re: RFC 76 (v1) Builtin: reduce Jarkko Hietaniemi
- Re: RFC 76 (v1) Builtin: reduce Larry Wall
- Re: RFC 76 (v1) Builtin: reduce Nathan Wiger
- Re: RFC 76 (v1) Builtin: reduce Jeremy Howard
- Re: RFC 76 (v1) Builtin: reduce Glenn Linderman
- Re: RFC 76 (v1) Builtin: reduce Damian Conway
- Re: RFC 76 (v1) Builtin: reduc... Jeremy Howard
- Re: RFC 76 (v1) Builtin: reduc... Damian Conway
- Re: RFC 76 (v1) Builtin: reduce Damian Conway
- Re: RFC 76 (v1) Builtin: reduce Glenn Linderman
- Re: RFC 76 (v1) Builtin: reduce Glenn Linderman
- Re: RFC 76 (v1) Builtin: reduce Damian Conway
- Re: RFC 76 (v1) Builtin: reduce Glenn Linderman
- Re: RFC 76 (v1) Builtin: reduce Damian Conway