On Wed Feb 05 19:50:41 2020, PEVANS wrote:
Show quoted text> 1.54 added "sample" which handles this
it was already pointed out in the mentioned ticket that the behaviors of pick() and roll() are different:
https://github.com/Dual-Life/Scalar-List-Utils/pull/43#issuecomment-577858347
perl6's roll() is similar to your implementation of sample(), but it is different from perl6's pick():
https://docs.perl6.org/type/List#routine_roll
if a user wanted to emulate pick(), they'd have to call sample(1, @a) multiple times, which isn't any better than calling `map { $a[rand @a] } 1..$n`.