Dice game probabilities: Difference between revisions
m
→{{header|Raku}}: .perl -> .raku
m (→optimized: increased the displayed digits, changed a comment.) |
SqrtNegInf (talk | contribs) m (→{{header|Raku}}: .perl -> .raku) |
||
Line 1,591:
=={{header|Raku}}==
(formerly Perl 6)
{{
<lang perl6>sub likelihoods ($roll) {
my ($dice, $faces) = $roll.comb(/\d+/);
Line 1,610:
# We're using standard DnD notation for dice rolls here.
say .gist, "\t", .
say .gist, "\t", .
{{out}}
<pre>0.573144077 <48679795/84934656>
|