mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-19 03:44:23 -05:00
using 'where' for array comprehension filtering, after kamatsu's suggestion -- execution tests pass now with significant whitespace
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
nums: n * n for n in [1, 2, 3] if n % 2 isnt 0.
|
||||
results: n * 2 for n in nums.
|
||||
nums: n * n for n in [1, 2, 3] where n % 2 isnt 0
|
||||
results: n * 2 for n in nums
|
||||
|
||||
# next: for n in [1, 2, 3] if n % 2 isnt 0
|
||||
# print('hi') if false
|
||||
|
||||
Reference in New Issue
Block a user