-- main.mcl -- import "iter" func itermap($a, $b) { iter.map($a, $b) } $fn = func($x) { $x + $x } $in1 = [5, 4, 3, 2, 1,] $in2 = ["a", "b", "c", "d", "e",] $out1 = iter.map($in1, $fn) $out2 = iter.map($in2, $fn) $out3 = itermap($in1, $fn) $out4 = itermap($in2, $fn) $t1 = template("out1: {{ . }}", $out1) $t2 = template("out2: {{ . }}", $out2) $t3 = template("out3: {{ . }}", $out3) $t4 = template("out4: {{ . }}", $out4) test $t1 {} test $t2 {} test $t3 {} test $t4 {} -- OUTPUT -- Vertex: test[out1: [10 8 6 4 2]] Vertex: test[out2: [aa bb cc dd ee]] Vertex: test[out3: [10 8 6 4 2]] Vertex: test[out4: [aa bb cc dd ee]]