mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-24 15:48:47 +00:00
Closures (in interpretation)
This commit is contained in:
parent
39388d77fd
commit
c92555f7a8
5 changed files with 38 additions and 25 deletions
2
regression/orig/test061.log
Normal file
2
regression/orig/test061.log
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
> 11
|
||||
18
|
||||
10
regression/test061.expr
Normal file
10
regression/test061.expr
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
fun plus (x) {
|
||||
fun f (y) {
|
||||
return x + y
|
||||
}
|
||||
|
||||
return f
|
||||
}
|
||||
|
||||
write (plus(5)(6));
|
||||
write (plus(8)(10))
|
||||
1
regression/test061.input
Normal file
1
regression/test061.input
Normal file
|
|
@ -0,0 +1 @@
|
|||
5
|
||||
Loading…
Add table
Add a link
Reference in a new issue