mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-19 03:44:23 -05:00
added array comprehensions over ranges
This commit is contained in:
@@ -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].
|
||||
Reference in New Issue
Block a user