maxtaco / coffee-script

IcedCoffeeScript
http://maxtaco.github.com/coffee-script
MIT License
727 stars 58 forks source link

for x in [a,b,c] by n - looping over a list with stride - doesn't work in iced #89

Open davidbau opened 11 years ago

davidbau commented 11 years ago

Another oddball stride issue - for loops over an explicit using "by" to stride don't work in iced. Tested on 1.6.3-g. Repro:

for x in ['a', 'b', 'c'] by -1
  await setTimeout defer(), 1000
  console.log x

for x in ['d', 'e', 'f'] by 2
  await setTimeout defer(), 1000
  console.log x

Expect: the order you'd get if you commented out the await lines, just slower, i.e. c b a d f Observe: the "by" are ignored: a b c d e f