(no title)
eric-wieser | 2 years ago
do let x ← List.range' 1 10; return x^2
The syntax is flexible enough that you could build your own: macro "[" r:term "|" preamble:doElem "]" : term => `(do
$preamble; return $r)
#eval [x^2 | let x ← List.range' 1 10]
kmill|2 years ago
2pEXgD0fZ5cF|2 years ago