go-jsonnet/testdata/arrcomp4.input
Stanisław Barzowski c26c50c04b Array comprehensions (#35)
* Array comprehensions

Implemented using flatMap.

The representation in AST was changed - now it expresses
the semantic structure better.

Ifs in comprehensions are not supported yet, but easy.
2017-09-07 11:55:33 -04:00

2 lines
40 B
Plaintext

[y for x in [1, 2, 3] for y in [x + 1]]