Closure-pattern, infix references (interpretataion only)

This commit is contained in:
Dmitry Boulytchev 2019-09-25 00:25:40 +03:00
parent c92555f7a8
commit efea4901ef
8 changed files with 57 additions and 18 deletions

20
regression/test062.expr Normal file
View 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) ()