:
ErrorsCollection

:

Synthesised documentation from language/variables

From language/variables

See Original text in context

The : twigil declares a formal named parameter to a block or subroutine. Variables declared using this form are a type of placeholder variable too. Therefore the same things that apply to variables declared using the ^ twigil also apply here (with the exception that they are not positional and therefore not ordered using Unicode order). For instance:

say { $:add ?? $^a + $^b !! $^a - $^b }45 ) :!add
# OUTPUT: «-1␤»

See ^ for more details about placeholder variables.