Re: [perl #63712] [PATCH] Reimplement List.min in Perl6 instead of PIR

2009-03-09 Thread Vasily Chekalkin
Patrick R. Michaud via RT wrote: On Sat, Mar 07, 2009 at 09:50:02PM -0800, Vasily Chekalkin wrote: +our List multi min(*...@values) { +my $by = @values[0] ~~ Code ?? shift @values !! sub { $^a cmp $^b }; +@values.min($by); +} This doesn't match the spec -- the $by parameter is required

Re: [perl #63712] [PATCH] Reimplement List.min in Perl6 instead of PIR

2009-03-08 Thread Moritz Lenz
Patrick R. Michaud wrote: > On Sat, Mar 07, 2009 at 09:50:02PM -0800, Vasily Chekalkin wrote: >> +our List multi min(*...@values) { >> +my $by = @values[0] ~~ Code ?? shift @values !! sub { $^a cmp $^b }; >> +@values.min($by); >> +} > > This doesn't match the spec -- the $by parameter is r

Re: [perl #63712] [PATCH] Reimplement List.min in Perl6 instead of PIR

2009-03-08 Thread Patrick R. Michaud
On Sat, Mar 07, 2009 at 09:50:02PM -0800, Vasily Chekalkin wrote: > +our List multi min(*...@values) { > +my $by = @values[0] ~~ Code ?? shift @values !! sub { $^a cmp $^b }; > +@values.min($by); > +} This doesn't match the spec -- the $by parameter is required. At any rate, the first argu