lua-users home
lua-l archive

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

On Tue, Aug 10, 2010 at 1:42 PM, Shawn Fox <> wrote:
> So based on this I think what I'm really asking for is that something like:
> foo = namespace
>     local x = 99
>    function bar(y) print(x+y) end
> end

which isn't too different from what I would recommend below, where f
could be various functions including `namespace` and `class` suitably

  foo = f(function(M)
    local x = 99
    function print(x+y) end