l.s.
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
my Pair @p = a => 1, b => 2;
a => 1 b => 2
@p.push(x=>1);
a => 1 b => 2
my Array $p = [ a => 1, b => 2];
a => 1 b => 2
$p.push(x=>1);
On Sat, Jun 13, 2015 at 12:25 PM, mt1957 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
Hi Eirik,
I thought about this a bit longer. I've seen this before that typo's in
the named arguments can lead to things for which you think would happen
but they don't. proper testing should reveal this of course. But it
would also be nice that an error would be given by perl6 and we would
h