Skip to content

Instantly share code, notes, and snippets.

View dmitrii-eremin's full-sized avatar

Eremin Dmitrii dmitrii-eremin

View GitHub Profile
@dmitrii-eremin
dmitrii-eremin / merge-table.lua
Created July 23, 2020 12:57 — forked from qizhihere/merge-table.lua
merge two tables in lua
local function table_clone_internal(t, copies)
if type(t) ~= "table" then return t end
copies = copies or {}
if copies[t] then return copies[t] end
local copy = {}
copies[t] = copy
for k, v in pairs(t) do