lua-users home
lua-l archive

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


Since foo:bar() is equivalent to foo.bar(foo) , 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?