Hi Bill,

:_ is a Pair with the colon syntax that stands for "_" => True. In the first 
case, it got passed as a named argument and say ignored it. The second case was 
a method call using the colon syntax - the syntax lizmat challenged not so long 
ago.  https://github.com/Raku/problem-solving/issues/384 so, ultimately, it was 
(:_).say, a normal say method call on a Pair.

Cheers



A(z) Galaxy eszközömről küldve



-------- Eredeti üzenet --------
Feladó: William Michels <w...@caa.columbia.edu>
Dátum: 2023. 09. 25. 7:15 (GMT+01:00)
Címzett: perl6-users <perl6-us...@perl.org>
Tárgy: What does `:_` and/or `:_:` signify?

Hello,

While playing around in an attempt to define new operators, I stumbled upon 
some curious results.

In the REPL, trying `say :_` returns a blank line.

In the REPL, trying `say :_:` returns `_ => True`.

What is the meaning of this?

admin@mbp ~ % raku
Welcome to Rakudo™ v2023.05.
Implementing the Raku® Programming Language v6.d.
Built on MoarVM version 2023.05.

To exit type 'exit' or '^D'
[0] > say _
===SORRY!=== Error while compiling:
Undeclared name:
    _ used at line 1

[0] > say :_

[0] > say :_:
_ => True
[0] >

Reply via email to