Jump to content

Variadic function: Difference between revisions

m
→‎{{header|Raku}}: Fix comment: Perl 6 --> Raku
(Rename Perl 6 -> Raku, alphabetize, minor clean-up)
m (→‎{{header|Raku}}: Fix comment: Perl 6 --> Raku)
Line 2,207:
order: knock at the door</pre>
 
Perl 6Raku also supports slurpy arrays and hashes, which are formal parameters that consume extra positional and keyword arguments like <code>@_</code> and <code>%_</code>. You can make a parameter slurpy with the <code>*</code> twigil. This implementation of <code>&foo</code> works just like the last:
 
<lang perl6>sub foo (*@positional, *%named) {
2,392

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.