perl6-language  

Re: Slurpy "is rw" arrays ([EMAIL PROTECTED] is rw)

TSa (Thomas Sandlaß)
Fri, 29 Jul 2005 09:44:00 -0700

HaloO,

Adriano Ferreira wrote:
Only

            sub foobar (@args) { push @args, 42 }

would change @some_array in

            foobar @some_array;

That is how I undestood that. Can someone confirm this belief?

I share your belief. It's up to others to confirm it. I just
want to add that I further believe that the push call is dispatched
on the type of the array and only succeeds if @array.does(Pushable).
I guess a default array does this or another role that implies it.
--
$TSa.greeting := "HaloO"; # mind the echo!
  • Re: Slurpy "is rw" arrays ([EMAIL PROTECTED] is rw) TSa (Thomas Sandlaß)