|
|
|
|
|
by ufo
4342 days ago
|
|
a straightfoward translation of the Javascript version w/ closures should work function goal(n)
return function(al)
if al then
return "G" .. string.rep("o", n) .. al
else
return goal(n+1)
end
end
end
G = goal(0)
print( G()()('al') )
Also note that G()'al' is just syntactic sugar for G()('al') in Lua |
|