tasks a-s

This commit is contained in:
Ingy döt Net 2013-04-10 23:57:08 -07:00
parent 47bf37c096
commit b83f433714
12433 changed files with 156208 additions and 123 deletions

View file

@ -0,0 +1,3 @@
(1..6).roll; # return 1 random value in the range 1 through 6
(1..6).roll(3); # return a list of 3 random values in the range 1 through 6
(1..6).roll(*); # return a lazy infinite list of random values in the range 1 through 6

View file

@ -0,0 +1,5 @@
# define the deck
constant deck = 2..9, <J Q K A> X~ <♠ ♣ ♥ ♦>;
deck.pick; # Pick a card
deck.pick(5); # Draw 5
deck.pick(*); # Get a shuffled deck

View file

@ -0,0 +1 @@
@array[@array * rand]

View file

@ -0,0 +1 @@
say Bool.pick; # returns either True or False