--[[
	
	Clones a table giving it a unique memory address. Doesn't support mixed tables and userdata.
	
	Functions.CloneTable(
		table,					<-- |REQ| 	Table/dictionary	
	)

--]]


local deepcopy
function deepcopy(t, root, omit)
	local clone = {}
	for key, value in pairs(t) do
		if t == root and key == omit then
			print"omit"
			continue
		end
		if type(key) == "table" then
			clone[key] = deepcopy(value, root, omit)
		else
			clone[key] = value
		end
	end
	return clone
end

return function(tbl, omit)
	return deepcopy(tbl, tbl, omit)
end
