Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local metatable = {
- _unm = function (t) do
- egated[key] = -value -- negate all of the values in this table
- end
- return negated -- return the table
- end
- }
- local table1 = setmetatable({10, 11, 12}, metatable)
- print(table.concat(-table1, "; ")) --> -10; -11; -12
- end
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement