mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-15 19:28:47 +00:00
Better scoping in repeat/for, lazy expression (no implicit import yet)
This commit is contained in:
parent
cf78cd20e3
commit
556ce81106
11 changed files with 42 additions and 16 deletions
|
|
@ -1,4 +1,4 @@
|
|||
fun lazy (f) {
|
||||
fun makeLazy (f) {
|
||||
local flag = 0, value = 0;
|
||||
|
||||
fun () {
|
||||
|
|
@ -12,7 +12,7 @@ fun lazy (f) {
|
|||
}
|
||||
}
|
||||
|
||||
local l = lazy (fun () {write (1); 800});
|
||||
local l = makeLazy (fun () {write (1); 800});
|
||||
local x = read ();
|
||||
|
||||
write (l ());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue