mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-09 16:28:47 +00:00
21 lines
No EOL
211 B
Text
21 lines
No EOL
211 B
Text
fun f () {
|
|
local x, l = {};
|
|
fun g () {return x}
|
|
|
|
x := 1;
|
|
l := g : l;
|
|
|
|
x := 2;
|
|
l := g : l;
|
|
|
|
return l
|
|
}
|
|
|
|
fun p (l) {
|
|
case l of
|
|
{} -> skip
|
|
| h : tl -> write (h ()); p (tl)
|
|
esac
|
|
}
|
|
|
|
p (f ()) |