lua-users home
lua-l archive

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


> > I'm really confused: what's wrong with
> >
> > > function decl(name)\
> > setglobal(name, function () return name .. "!" end)\
> > end
>
> It will not work with Lua 4.0 ;-)  (cannot access a variable in outer scope)

I thought the original question was asked about Lua 4.1, but it wasn't. I
think I assumed it was because the example solution given said "upvalues
have their uses after all" and was given in a 4.1 session...