[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Access a member from within the table def
- From: "Robert G. Jakabosky" <bobby@...>
- Date: Thu, 13 May 2010 11:56:37 -0700
On Thursday 13, Vadim Peretokin wrote:
> Nope, my bad - I actually do
>
> t = {
> foo = function() end,
> bar = function () some_global_function(t.foo) end,
> }
if some_global_function() should only be called once, then you would need to
do:
t = {
foo = function() end,
bar = function () t.bar = some_global_function(t.foo); return t.bar end,
}
--
Robert G. Jakabosky