Oddly, these two expressions have the same output:

for 0 ...^ (3+4) -> $i { say $i }
for 0 ...^ 7 -> $i { say $i }

But this one prints the numbers 0 through 7 instead of leaving off the last
number:

for 0 ...^ 3+4 -> $i { say $i }

It does the same with or without the ^ so it's like it's just ignoring the ^
in the case above.

I can understand how it could do many different things, but printing 0
through 7 is definitely not one I can figure out. Anyone know what's up,
here? This seems to hold true for mathematical expressions such as:

for 0 ...^ 4*2 -> $i { say $i }

But not exponentiation:

for 0 ...^ 4**2 -> $i { say $i }

which prints 0 through 15.

-- 
Aaron Sherman
Email or GTalk: a...@ajs.com
http://www.ajs.com/~ajs

Reply via email to