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

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

2009-03-08 Thread via RT
# New Ticket Created by Vasily Chekalkin # Please include the string: [perl #63712] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=63712 > --- src/builtins/any-list.pir | 47 -