capture
ErrorsCollection

capture

Synthesised documentation from type/Parameter

From type/Parameter

See Original text in context

method capture(Parameter:D: --> Bool:D)

Returns True for parameters that capture the rest of the argument list into a single Capture object.

sub how_many_extra_positionals($!|capture{ capture.elems.say }
how_many_extra_positionals(0123);                        # OUTPUT: «3» 
say &how_many_extra_positionals.signature.params[1].capture;   # OUTPUT: «True␤»

Like raw parameters, Capture parameters do not force any context on the values bound to them, which is why their sigils are only used in declarations.