in reply to Re: for loop syntax difference
in thread for loop syntax difference

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.