Quick actions

cmd+k|ctrl+k

Navigation

Languages

[Perl 6] Mix Demo

Snippet info

Language

Raku

Visibility

public

Author

cwchen.tw

Created

2017-09-14T05:43:16Z

Updated

2017-09-14T08:16:42Z

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; 
}
INFO