Debian Codegraph @

lang/interpret_test/TestAstFunc2/chained-returned-lambdas.txtar

raw
1 -- main.mcl --
2 # simple function definition containing function to be returned
3 $funcgen = func() {
4 func() {
5 func() {
6 func() {
7 "hello"
8 }
9 }
10 }
11 }
12
13 $fn1 = $funcgen()
14 $fn2 = $fn1()
15 $fn3 = $fn2()
16 $out = $fn3()
17
18 test "${out}" {}
19 -- OUTPUT --
20 Vertex: test[hello]