got negative ranges working with (much, much) uglier compiled code

This commit is contained in:
Jeremy Ashkenas
2009-12-26 20:35:43 -08:00
parent 47b45c4494
commit 903331f3ff
3 changed files with 20 additions and 15 deletions

View File

@@ -1,5 +1,8 @@
nums: i * 3 for i in [1..3].
result: nums.join(', ')
negs: x for x in [-20..-10].
negs: negs[0..2]
print(result is '3, 6, 9')
result: nums.concat(negs).join(', ')
print(result is '3, 6, 9, -20, -19, -18')