moonscript/tests/inputs/comprehension.moon
2011-11-17 20:34:16 -08:00

10 lines
137 B
Plaintext

items = {1,2,3,4,5,6}
out = {k,k*2 for k in items}
x = hello: "world", okay: 2323
copy = {k,v for k,v in pairs x when k != "okay"}