my @suits = < ♣ ♢ ♡ ♠ >; my @ranks = 2..10, < J Q K A >; # concatenate each rank with each suit (2♣ 2♢ 2♡ ... A♠) my @deck = @ranks X~ @suits;continued...
Perl 6 | Cool operators in Perl 6 | #13 |
my @suits = < ♣ ♢ ♡ ♠ >; my @ranks = 2..10, < J Q K A >; # concatenate each rank with each suit (2♣ 2♢ 2♡ ... A♠) my @deck = @ranks X~ @suits;continued...
Copyright © 2009 http://www.pmichaud.com/2009/pres/ |