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

# Different element types and a different output type. Also exercises
# truncation: $ys has fewer elements than $xs so the output stops at 3.
$xs = [1, 2, 3, 4, 5]
$ys = ["a", "b", "c"]

$out = iter.zip($xs, $ys, func($x, $y) {
	fmt.printf("%d:%s", $x, $y)
})

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

test "${t}" {}
-- OUTPUT --
Vertex: test[out: [1:a 2:b 3:c]]
