diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-07-14 14:13:23 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-07-14 14:13:23 -0400 |
| commit | d3f14cf53cf857b90184900a726e3ee0875dea80 (patch) | |
| tree | b1f89d5be1781ce4ed1384446bc53b51118d0350 /test | |
| parent | 4e6d8162bfa7149c3b947c6c759f82c1f52ef4d7 (diff) | |
Support nested lambda closures
Diffstat (limited to 'test')
| -rw-r--r-- | test/lambdas.tm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/lambdas.tm b/test/lambdas.tm index 15a8f23b..cb5bf3d4 100644 --- a/test/lambdas.tm +++ b/test/lambdas.tm @@ -30,3 +30,13 @@ func main(): >> abs100 := mul_func(100, Int.abs) >> abs100(-5) = 500 + + // Test nested lambdas: + outer := "Hello" + fn := func(): + return func(): + return func(): + defer: |{outer} + return outer + >> fn()()() + = "Hello" |
