Announce: Rakudo Star Release 2015.09

2015-09-26 Thread Moritz Lenz
On behalf of the Rakudo and Perl 6 development teams, I'm excited to announce the September 2015 release of "Rakudo Star", a useful and usable distribution of Perl 6. The tarball for the September 2015 release is available from . This Rakudo Star release comes

Does Perl 6 use $a and $b in sorting?

2015-09-26 Thread Parrot Raiser
Because of the the special significance of $a and $b in Perl 5's sort comparison, I always avoid using the names in examples, lest it set a booby-trap for later. I've noticed "a" and "b' being used in some P6 examples. Are they no longer significant, or are they just a poor choice of identifier?

Re: Does Perl 6 use $a and $b in sorting?

2015-09-26 Thread Tobias Leich
sort accepts something callable with an arity of 2. Subroutines, blocks and pointies will do: say sort { $^a cmp $^b }, 5, 3, 2, 6, 4 OUTPUT«(2 3 4 5 6)␤» say sort { $^left cmp $^right }, 5, 3, 2, 6, 4 OUTPUT«(2 3 4 5 6)␤» say sort -> $a, $b { $a cmp $b }, 5, 3, 2, 6, 4 OUTPUT«(2 3 4 5 6)␤»