gpt4 book ai didi

syntax - Mix 不支持 .pick?

转载 作者:行者123 更新时间:2023-12-02 06:46:03 25 4
gpt4 key购买 nike

我正在尝试这个:

 my Mix $mix = { foo => 3.5, bar => 2.5}.Mix; 
say $mix.pick

理论上这应该有效,因为 a Mix does Baggy ,和Baggy does pick 。但是,我收到错误:

.pick is not supported on a Mix

知道为什么不支持它吗?我应该使用什么替代方案?

最佳答案

Any idea why it's not supported?

也许:

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

来自http://colabti.org/irclogger/irclogger_log/perl6?date=2013-10-03#l1369

What alternative should I use?

我怀疑这是“自己写的”。

关于syntax - Mix 不支持 .pick?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51464303/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com