Files
mgmt/lang/interpret_test/TestAstFunc2/map-iterator4.txtar
James Shubin f92f34dc54 lang: The in keyword can't be a variable name
At least for now until we figure out some fancier parser magic. (If
at all possible!)
2024-01-12 18:22:00 -05:00

17 lines
290 B
Plaintext

-- main.mcl --
import "iter"
$ins = ["a", "bb", "ccc", "dddd", "eeeee",]
# the inline lambda format is more readable with the func as the second arg
$out = iter.map($ins, func($x) {
len($x)
})
$t = template("out: {{ . }}", $out)
test $t {}
-- OUTPUT --
Vertex: test[out: [1 2 3 4 5]]