mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
13 lines
No EOL
295 B
CoffeeScript
13 lines
No EOL
295 B
CoffeeScript
# Expression conversion under explicit returns.
|
|
first: ->
|
|
return 'do' for x in [1,2,3]
|
|
|
|
second: ->
|
|
return ['re' for x in [1,2,3]]
|
|
|
|
third: ->
|
|
return ('mi' for x in [1,2,3])
|
|
|
|
ok first().join(' ') is 'do do do'
|
|
ok second()[0].join(' ') is 're re re'
|
|
ok third().join(' ') is 'mi mi mi' |