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
 return a+b



Daniel Silverstone                     
Hostmaster, Webmaster, and Chief Code Wibbler          Digital-Scurf Unlimited
GPG Public key available from            KeyId: 20687895
Owe no man any thing...
		-- Romans 13:8