mirror of
https://github.com/leafo/moonscript.git
synced 2024-12-08 01:54:24 +00:00
56 lines
504 B
Plaintext
56 lines
504 B
Plaintext
|
-- testing `return` propagation
|
||
|
|
||
|
-> x for x in *things
|
||
|
-> [x for x in *things]
|
||
|
|
||
|
|
||
|
-- doesn't make sense on purpose
|
||
|
do
|
||
|
return x for x in *things
|
||
|
|
||
|
do
|
||
|
return [x for x in *things]
|
||
|
|
||
|
do
|
||
|
return {x,y for x,y in *things}
|
||
|
|
||
|
->
|
||
|
if a
|
||
|
if a
|
||
|
a
|
||
|
else
|
||
|
b
|
||
|
elseif b
|
||
|
if a
|
||
|
a
|
||
|
else
|
||
|
b
|
||
|
else
|
||
|
if a
|
||
|
a
|
||
|
else
|
||
|
b
|
||
|
|
||
|
|
||
|
do
|
||
|
return if a
|
||
|
if a
|
||
|
a
|
||
|
else
|
||
|
b
|
||
|
elseif b
|
||
|
if a
|
||
|
a
|
||
|
else
|
||
|
b
|
||
|
else
|
||
|
if a
|
||
|
a
|
||
|
else
|
||
|
b
|
||
|
|
||
|
-> a\b
|
||
|
do a\b
|
||
|
|
||
|
|