lua-users home
lua-l archive


Since foo:bar() is equivalent to , I expected the following code:

f = foo:bar

To do something along the lines of:

f = (function(self) return function() return self:bar() end end)(foo)

In other words, I expect foo:bar to return a function. Is there any
reason why it shouldn't do this?