On Fri, Apr 25, 2008 at 01:05:37PM -0700, Dave Whipp wrote:
> As a perl5-ism:
>
> sub foo { say @_; }
>
> ...
>
> given (@bar) {
>   when ... { &foo }
> }
>
>
> Does perl6 still have some implicit mechanism to say "call sub using 
> current arglist"?

Yes, you can do it implicitly with one of callsame, callwith, nextsame
and nextwith (S06 and S12), depending on whether you want to specify
what to call next or just rely on the dispatcher to pick the next
one, and on whether you want to pass the original arguments or some
modified arguments.

You can also do it explicitly with a Capture declaration in the
signature and the prefix:<|> capture interpolator in an argument list..

However, &foo doesn't mean what it means in Perl 5.  It's just the
function as a noun rather than a verb.

Larry

Reply via email to