develooper Front page | perl.perl6.users | Postings from November 2020

Junctions wrapped in singleton lists

Thread Next
From:
Sean McAfee
Date:
November 13, 2020 23:23
Subject:
Junctions wrapped in singleton lists
Message ID:
CANan03ajMeG1kNA_=14xq_O09koYFDYPkQdBeM2SairBEELbwA@mail.gmail.com
I just tried making a sequence of junctions and found that each one ended
up wrapped in a singleton list somehow:

    > ({ 1 | -1 } ... *)[^3]
    ((any(1, -1)) (any(1, -1)) (any(1, -1)))

Strangely, I can set an ending condition that works like I would expect,
but the sequence still produces single lists.

    > { (1|-1) * ++$ } ... -3
    ((any(1, -1)) (any(2, -2)) (any(3, -3)))

This seems to happen for any kind of junction, not just or-junctions.

Is this a bug, or some legitimate rule I'm unaware of?

Thread Next


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