lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Thu, Nov 01, 2001 at 12:16:07PM -0200, Luiz Henrique de Figueiredo wrote:
> The main change in this version is that Lua now has lexical scoping; upvalues
> are gone!

Given that I've only scanned through the new manual I might have missed it,
but could you possibly give me an equivalent to the following 4.0 function
in 4.1-work ?

function add1(a,b)
 if b == nil then
  return function(bb) return add1(%a,bb); end
 endif
 return a+b
end

Thanks

Dan

-- 
Daniel Silverstone                               http://www.digital-scurf.org/
Hostmaster, Webmaster, and Chief Code Wibbler          Digital-Scurf Unlimited
GPG Public key available from germany.keyserver.net            KeyId: 20687895
Owe no man any thing...
		-- Romans 13:8