local function deepcopy(input)
local t=type(input)
if t~="table" then
return input
end
local copy={}
for k,v in pairs(input) do
k=deepcopy(k)
v=deepcopy(v)
copy[k]=v
end
return copy
end
local y=deepcopy(x)
Deepcopy is necessary, since a list could also contains a list.
This deepcopy will be a infinite loop for a list that contains itself.
This deepcopy will be a infinite loop for a list that contains itself.