added array comprehensions over ranges

This commit is contained in:
Jeremy Ashkenas
2009-12-26 00:16:40 -08:00
parent 834442148b
commit ff78546465
5 changed files with 38 additions and 16 deletions

View File

@@ -0,0 +1,5 @@
nums: i * 3 for i in [1..3].
result: nums.join(', ')
print(result is '3, 6, 9')