Is that one argument or none for a Perl 6 block?
问题 What is the Perl 6 way to tell the difference between an argument and no argument in a block with no explicit signature? I don't have any practical use for this, but I'm curious. A block with no explicit signature puts the value into $_ : my &block := { put "The argument was $_" }; The signature is actually ;; $_? is raw . That's one optional argument. The @_ variable isn't defined in the block because there is no explicit signature. There's the no argument, where $_ will be undefined: &block