On Sun Jun 21 12:05:11 2009, moritz wrote: > 21:03 <@moritz_> rakudo: my @a = 1, 2, 4; sub f($a) { say $a }; > f(|@a[*-1..*-1]) > 21:03 < p6eval> rakudo 1b06df: OUTPUT«argument doesn't arrayin sub f > (/tmp/2x4tmnOO68:1)called from Main (/tmp/2x4tmnOO68:2)» >
I investigated a bit more, and found that @a[*-1..*-1] just gives 4, and f(|4) results in the same error message. So while the current behaviour is not very dwimmy, it is at least somewhat understandable. What's the opinion of the p6l people? Should |@a[1..1] work? even at the cost of allowing |1 not to be an error? Cheers, Moritz