lunar_wave/test_vectors/closure.lua

10 lines
132 B
Lua
Raw Normal View History

local function make_closure (x)
print (x)
return function (y)
return x + y
end
end
local f = make_closure (11)
print (f (12))