Perl6 vs Ruby: reduce

Ruby:

sum = (1..10).reduce {|x,y| x+y}

or maybe

sum = (1..10).reduce {:+}

Perl6:

my $sum = [+] 1..10;

That has got to be some of the sexiest perl syntax ever!

Posted Wed, Jan 21, 2009