lua-users home
lua-l archive

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


Is there a way to do this:
 
t = {
    foo = function() end,
    bar = some_global_function(foo),
}
 
Currently I'm handling that by doing the following:
 
t = {
    foo = function() end,
}
t.bar = some_global_function(t.foo)
 
Is there some other syntax that I don't know about that would allow me to reference a table member from inside the table definition?
 
Brian