Created
July 24, 2014 15:23
-
-
Save kfly8/ca126161ecf35d697f06 to your computer and use it in GitHub Desktop.
0 に評価されるのが複数あると、無限ループのよう
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 List::UtilsBy qw/weighted_shuffle_by/; | |
my @wlist = ( | |
{ value => 'a', weight => 0 }, | |
{ value => 'b', weight => 0 }, | |
); | |
weighted_shuffle_by { $_->{weight} } @wlist; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment