lua-users home
lua-l archive

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


Can I set a different index in metatable? Something like this

local mt = { __index =
  { insert = function(t,pos,value) table.insert(t,pos, value) end},
  { remove = function(t,pos) table.remove(t,pos) end}
}

If yes, what would be the correct way?