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

@@ -3,3 +3,6 @@ lunch: food.eat() for food in ['toast', 'cheese', 'wine'].
# Zebra-stripe a table.
highlight(row) for row, i in table if i % 2 is 0.
# Check the first one hundred combinations.
lockpick(combinations[i]) for i in [1..100].