-- main.mcl -- import "os" $apply1 = func($f, $x) { $f($x) } $apply2 = func($f, $x) { $f($f($x)) } $apply = if (os.system("echo 0; echo 1") == "0") {$apply1} else {$apply2} $id = func($y) { $y } # since $apply changes over time, this call needs a dynamic sub-graph. In # theory, the $f calls above do not need a sub-graph, but does our optimization # support this corner case yet? $name = $apply($id, "foo") test "${name}" {} -- OUTPUT -- Vertex: test[foo]