Skip to content

Commit

Permalink
Merge pull request #1691 from willbailey/master
Browse files Browse the repository at this point in the history
I didn't see an example of how to do this and thought it might be helpful for others.
  • Loading branch information
jashkenas committed Sep 12, 2011
2 parents 0b57b31 + 98cc7eb commit 2c8690e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions documentation/coffee/array_comprehensions.coffee
@@ -1,2 +1,10 @@
# Eat lunch.
eat food for food in ['toast', 'cheese', 'wine']

# Fine dining
courses = ['salad', 'entree', 'dessert']
menu course + 1, dish for dish, course in courses

# Health conscious meal
foods = ['broccoli', 'spinach', 'chocolate']
eat food for food in foods when food isnt 'chocolate'

0 comments on commit 2c8690e

Please sign in to comment.