PageRenderTime 21ms CodeModel.GetById 14ms app.highlight 3ms RepoModel.GetById 2ms app.codeStats 0ms

/documentation/coffee/array_comprehensions.coffee

http://github.com/jashkenas/coffee-script
CoffeeScript | 10 lines | 5 code | 2 blank | 3 comment | 3 complexity | bdffca61ace0c1bddc35d76838015e3f MD5 | raw file
 1# Eat lunch.
 2eat food for food in ['toast', 'cheese', 'wine']
 3
 4# Fine five course dining.
 5courses = ['greens', 'caviar', 'truffles', 'roast', 'cake']
 6menu i + 1, dish for dish, i in courses
 7
 8# Health conscious meal.
 9foods = ['broccoli', 'spinach', 'chocolate']
10eat food for food in foods when food isnt 'chocolate'