-- main.mcl --
import "golang"
import "iter"

# flatten composes with iter.map to give a flatMap-style operation: take each
# input and expand it into a small list, then flatten all of those together.
$xs = [1, 2, 3]

$out = iter.flatten(iter.map($xs, func($x) {
	[$x, $x + 10]
}))

$t = golang.template("out: {{ . }}", $out)

test "${t}" {}
-- OUTPUT --
Vertex: test[out: [1 11 2 12 3 13]]
