mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-18 11:31:20 -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,6 +1,7 @@
|
||||
func: =>
|
||||
a: 3
|
||||
b: []
|
||||
|
||||
while a >= 0
|
||||
b.push('o')
|
||||
a--
|
||||
@@ -20,7 +21,7 @@ func: =>
|
||||
text = c.text
|
||||
}
|
||||
|
||||
c.list: l for l in d.text.split('') if l is '-'
|
||||
c.list: l for l in d.text.split('') where l is '-'
|
||||
|
||||
c.single: c.list[1..1][0]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user