lua-users home
lua-l archive

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


> function conditional(test)
>   function add(item) return item end
>   function discard() return nil end
>   if test then return add end
>   return discard
> end

This pollutes the global namespace and creates add and discard each time
it is called.