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

              @deck Z @( (2..10, 10, 10, 10, 11) >>xx>> 4 );

This interleaves each card name with its point value

["2♣", 2, "2♢", 2, "2♡", 2, "2♠", 2,
 "3♣", 3, "3♢", 3, "3♡", 3, "3♠", 3,
  ...
 "K♣", 10, "K♢", 10, "K♡", 10, "K♠", 10,
 "A♣", 11, "A♢", 11, "A♡", 11, "A♠", 11,
]

When assigned to a hash, the card names are keys and the points are the values.

Copyright © 2010
http://www.pmichaud.com/2010/pres/