mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-24 07:38:46 +00:00
Closure-pattern, infix references (interpretataion only)
This commit is contained in:
parent
c92555f7a8
commit
efea4901ef
8 changed files with 57 additions and 18 deletions
20
regression/test062.expr
Normal file
20
regression/test062.expr
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
fun a (x, y) {
|
||||
local a = x + y, b = x - y;
|
||||
{
|
||||
local f = fun () {
|
||||
write (x);
|
||||
write (y);
|
||||
write (a);
|
||||
write (b)
|
||||
};
|
||||
|
||||
a := 100;
|
||||
b := 200;
|
||||
x := 800;
|
||||
y := 1000;
|
||||
|
||||
return f
|
||||
}
|
||||
}
|
||||
|
||||
a (5, 7) ()
|
||||
Loading…
Add table
Add a link
Reference in a new issue