Debian Codegraph @

lang/interpret_test/TestAstFunc2/conditional-scoped-lambda-ooo.txtar

raw
1 -- main.mcl --
2 # out of order
3 $out1 = $fn(true)
4 $some_bool = false
5 $fn = if $some_bool {
6 $funcgen()
7 } else {
8 func($bb) {
9 if $bb {
10 "so true"
11 } else {
12 "so false"
13 }
14 }
15 }
16 $out2 = $fn(false)
17 $funcgen = func() {
18 func($b) {
19 if $b {
20 "hello"
21 } else {
22 "world"
23 }
24 }
25 }
26
27 test "${out1}" {}
28 test "${out2}" {}
29 -- OUTPUT --
30 Vertex: test[so true]
31 Vertex: test[so false]