We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Take the simple example:
function make_addr(a) return function(b) return (a + b) end end -- should print 35 print(make_addr(15)(20)) addten = make_addr(10) -- should print 104 print(addten(94))
Running in with the regular lua interpreter the program outputs:
35 104
however when using cargo run -- closure.lua the result is:
cargo run -- closure.lua
40 188
I think this is because each chunk does not store its own locals