jashkenas--coffeescript/test/fixtures/execution/test_range_comprehension.co...

8 lines
155 B
CoffeeScript
Raw Normal View History

nums: i * 3 for i in [1..3]
2009-12-26 08:16:40 +00:00
negs: x for x in [-20..-5*2]
negs: negs[0..2]
2009-12-26 08:16:40 +00:00
result: nums.concat(negs).join(', ')
print(result is '3, 6, 9, -20, -19, -18')