I'm discovering Lua with ComputerCraft (for Minecraft), and I need 2 functions :
- the cardinal function #foo (for a given table named "foo")
- popping out the last element from a table, for example : foo[#foo] = nil (is there something better ?)
What are the respective complexity of these functions ? I particularly need a O(1) way to pop the last element of a table.
Sorry for bad english, thanks in advance.