for $i (1..10) creates a list with ten elements and iterates of that.
No, it doesn't. It's optimised into a counting loop. It increments the loop counter every pass rather than creating a list.
In reply to Re^2: for loop syntax difference
by ikegami
in thread for loop syntax difference
by sir_com
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |