Debian Codegraph @

lang/interpret_test/TestAstFunc2/simple-conditional-scoped-lambda-call.txtar

raw
1 -- main.mcl --
2 $funcgen1 = func() {
3 func($b) {
4 "hello"
5 }
6 }
7 $funcgen2 = func() {
8 func($bb) {
9 "world"
10 }
11 }
12
13 $some_bool = false
14 $fn = if $some_bool {
15 $funcgen1()
16 } else {
17 $funcgen2()
18 }
19
20 $out = $fn(false)
21 test "${out}" {}
22 -- OUTPUT --
23 Vertex: test[world]