On Sat, Jun 13, 2015 at 12:25 PM, mt1957 <mt1...@gmail.com> wrote:

> Can't push/unshift onto an array of pairs!
>
> Below a repl session with pushes
>
>  my @p = a => 1, b => 2;
>>
> a => 1 b => 2
>
>> @p.push(x=>1);
>>
> a => 1 b => 2
>

  That's not pushing a pair – that's pushing nothing (no positionals) with
a named argument (name x, value 1).

  Pairs vs named arguments are going to be one of the confusing points
about perl6, right?

> @p.push((x=>1));
"a" => 1 "b" => 2 "x" => 1


Eirik

Reply via email to