I am trying this:
my Mix $mix = { foo => 3.5, bar => 2.5}.Mix;
say $mix.pick
Which should theoretically work, since a Mix does Baggy, and Baggy does pick. However, I get the error:
.pick is not supported on a Mix
Any idea why it's not supported? What alternative should I use?
Any idea why it's not supported?
Perhaps:
lizmat TimToady: .pick($n > 1) on a MixHash, how would that work? I assume it won't work? What to deduct for a chosen key?
lizmat (or on a Mix, for that matter)
TimToady I don't we need to support .pick on a Mix until someone comes up with a real use case
From http://colabti.org/irclogger/irclogger_log/perl6?date=2013-10-03#l1369
What alternative should I use?
I suspect it's "write your own".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With