看起来像
maxpairs
> my @foo; @foo[2] = 4; say @foo.maxpairs;
Use of uninitialized value of type Any in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.
in block <unit> at <unknown file> line 1
(2 => 4)
max
没有相同的问题,似乎只是忽略未定义的值:
> my @foo; @foo[2] = 4; say @foo.max;
4
> my @foo; @foo[2] = 4; say @foo.pairs.max(*.value)
Use of uninitialized value of type Any in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.
in block <unit> at <unknown file> line 1
2 => 4
因此,似乎只有在使用时才会忽略未定义的值
没有过滤器参数。
这是虫子吗?