Skip to content

Instantly share code, notes, and snippets.

@akornatskyy
Last active August 23, 2017 09:14
Show Gist options
  • Select an option

  • Save akornatskyy/1476cfadb5e708d20775f7433d4e1e2c to your computer and use it in GitHub Desktop.

Select an option

Save akornatskyy/1476cfadb5e708d20775f7433d4e1e2c to your computer and use it in GitHub Desktop.
Lua: How to merge two tables
local function tblmerge(t1, t2)
local r = {}
for k, v in next, t1 do
r[k] = v
end
for k, v in next, t2 do
r[k] = v
end
return r
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment