Double junction arguments swapping sides

  • A+
Category:Languages

I'm confused about how double junctions are supposed to work.

This makes some sense:

say all('a', 'b', 'c') ~ any('d', 'e'); 

gives

all(any(ad, ae), any(bd, be), any(cd, ce)) 

This doesn't make sense:

say any('a', 'b', 'c') ~ all('d', 'e'); 

gives

all(any(da, db, dc), any(ea, eb, ec)) 

It confuses me because the letter 'a' which I would expect to be on the left of the letter 'd' is now on the right.

 


This was indeed a bug. This has been fixed with https://github.com/rakudo/rakudo/commit/4ef8433aa2 .

Thank you for your question / bug report! The next Rakudo compiler release / next Rakudo Star release will contain this fix.

Comment

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: