Created
August 24, 2011 17:00
-
-
Save VienosNotes/1168537 to your computer and use it in GitHub Desktop.
mD6 + nD10 in Perl6 (1)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use v6; | |
sub mD6 { | |
gather { take 6.rand.Int + 1 for 0..* } | |
} | |
sub nD10 { | |
gather { take 10.rand.Int for 0..* } | |
} | |
my ($m, $n) = @*ARGS; | |
say [+] mD6[1..$m], nD10[1..$n]; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment