D’oh! I’m blind.

But I see there’s a multi method Str defined on Any, and you can’t do
@inputs.map( .Str ), either (Use of uninitialized value $_ of type Any in
string context). Why not? (There’s no multi method Num on Any, even though
the docs about Cool <https://docs.perl6.org/type/Cool> seem to imply there
should be…)
​

On Sun, Sep 18, 2016 at 6:15 PM Brandon Allbery <allber...@gmail.com> wrote:

>
> On Sun, Sep 18, 2016 at 6:06 PM, Trey Harris <t...@lopsa.org> wrote:
>
>> Not work? It results inMethod 'prefix:<+>' not found for invocant of
>> class 'Any', but the docs
>> <https://docs.perl6.org/language/operators#prefix_+>
>>
>> say it is defined as a multi on Any….
>>
>>
> No, they say it's a multi sub, not a multi method on Any. And the prefix:
> syntax doesn't seem to work directly with the quick workaround for that, so
> it ends up being
>
>     for @inputs.map({ .&prefix:<+> }) { ... }
>
>
>
>
> --
> brandon s allbery kf8nh                               sine nomine
> associates
> allber...@gmail.com
> ballb...@sinenomine.net
> unix, openafs, kerberos, infrastructure, xmonad
> http://sinenomine.net
>

Reply via email to