31 lines
479 B
Lox
Executable File
31 lines
479 B
Lox
Executable File
|
|
function :: fn(): Nil do
|
|
print "Function";
|
|
end;
|
|
|
|
|
|
function_factory :: fn(): Any do
|
|
print "Function Factory";
|
|
function;
|
|
end;
|
|
|
|
function_fatcoty_factory :: fn(): Any do
|
|
print "Function Factory Factory";
|
|
return function_factory;
|
|
end;
|
|
|
|
//function();
|
|
//function_factory()();
|
|
//function_fatcoty_factory()()();
|
|
clock();
|
|
|
|
closure :: fn(): Any do
|
|
value := "Closure";
|
|
internal :: fn(): Nil do
|
|
print value;
|
|
end;
|
|
return internal;
|
|
end;
|
|
|
|
closure();
|