Perl 6 Cool Perl 6 #69
 # build a hash of card names to point values
 my %points = @deck Z @( (2..10, 10, 10, 10, 11) >>xx>> 4 );

                      @( (2..10, 10, 10, 10, 11) >>xx>> 4 )

This applies xx 4 to each element on the left hand side, repeating it four times

[(2, 2, 2, 2), (3, 3, 3, 3), (4, 4, 4, 4), (5, 5, 5, 5), ... ]

The @(...) flattens it out

[2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, ... ]
Copyright © 2010
http://www.pmichaud.com/2010/pres/