develooper Front page | perl.perl6.users | Postings from January 2019

Re: Pair colon-chains

Thread Previous
From:
yary
Date:
January 2, 2019 16:19
Subject:
Re: Pair colon-chains
Message ID:
CAG2CFAbyRHAg6Qy24=8v2=p541-qYVG-31caFg+vqCGCsDhMrw@mail.gmail.com
Copied to https://github.com/perl6/roast/issues/507
-y


On Tue, Dec 25, 2018 at 4:09 AM JJ Merelo <jjmerelo@gmail.com> wrote:

> Probably not. Can you please raise an issue in perl6/doc? The first one
> seems specially inconsistent...
> We'll have to check also if it's REPL only or it extends somewhere else...
>
> El mar., 25 dic. 2018 a las 1:23, yary (<not.com@gmail.com>) escribió:
>
>> https://docs.perl6.org/type/Pair says "Colon pairs can be chained
>> without a comma to create a List of Pairs. Depending on context you may
>> have to be explicit when assigning colon lists." - and follows with
>> examples, which led me to experiments, that raise more questions. I would
>> think all 5 of these should say the same thing but instead give 3 different
>> answers. Does the doc need an addition to describe this? Is it a problem
>> with Rakudo Star 2018.10?
>>
>> $ perl6
>>
>> To exit type 'exit' or '^D'
>>
>> > (:a1:b2:c3)
>>
>> (a1 => True b2 => 1 c3 => 1)
>>
>> > (:a1,:b2,:c3)
>>
>> (a1 => True b2 => True c3 => True)
>>
>> > :a1,:b2,:c3
>>
>> (a1 => True b2 => True c3 => True)
>>
>> > :a1:b2:c3
>>
>> a1 => True
>>
>> > :a1 :b2 :c3
>>
>> a1 => True
>>
>>
>>
>> -y
>>
>
>
> --
> JJ
>

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About