Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
[Perl 6] Sampling from a Mix.
cwchen
Nov 8th, 2017
1,503
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
Perl 6
0.13 KB
| None
|
0
0
raw
download
clone
embed
print
report
my
$mix
=
(
1
=>
0.8
,
2
=>
0.1
,
3
=>
0.05
,
4
=>
0.02
,
5
=>
0.01
)
.
Mix
;
loop
(
my
$i
=
0
;
$i
<
10
;
$i
++
)
{
$mix
.
roll
(
10
)
.
sort
.
say
;
}
Advertisement
Add Comment
Please,
Sign In
to add comment
Public Pastes
Untitled
1 hour ago | 8.54 KB
Untitled
1 hour ago | 9.63 KB
Untitled
3 hours ago | 8.93 KB
Untitled
3 hours ago | 7.42 KB
Untitled
5 hours ago | 11.38 KB
Untitled
7 hours ago | 10.12 KB
Untitled
7 hours ago | 5.91 KB
Untitled
9 hours ago | 9.65 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!