bartolin_ m: say (* < 7 and * > 5)(6)
camelia rakudo-moar ad062f: OUTPUT«True»
bartolin_ is that supposed to be the same as 'say (6 < 7 and 6 > 5)'?
m: say (6 < 7 and 6 > 5)
camelia rakudo-moar ad062f: OUTPUT«True»
bartolin_ m: say (* < 7 and * > 5)(7)
camelia rakudo-moar ad062f: OUTPUT«True»
FROGGS m: say (* < 7 and 7 > 5)(7)
camelia rakudo-moar ab73b0: OUTPUT«Cannot find method 'postcircumfix:<(
)>' in block <unit> at /tmp/TTAXdxnzeL:1»
FROGGS ?
ahh
the 'and' is not part of the code that is invoked via (7)
say (* < 7 and * > 5)(7) turns into m: say (WhateverCode and * >
5)(7), so the 7 is passed to the code after the 'and'
bartolin_ ahh, that explains it.
it's from RT #116208
bartolin_ ... which doesn't look quite right (closable) to me
FROGGS aye
AFAIU whatever-priming still does not work correctly with short-circuiting
operators. Shouldn't the example code only run with 2 arguments -- like the
following?
$ perl6 -e 'say ((* + 4) / (* - 4))(6)'
Too few positionals passed; expected 2 arguments but got 1
in block <unit> at -e:1
$ perl6 -e 'say ((* + 4) / (* - 4))(6,6)'
5