This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- the following deep copy function never stack overflows from recursion | |
-- needs optimization tho | |
local function deep(inp,copies) | |
-- push | |
local stack = {{inp = inp, key = nil, value = nil, next = false, skipNext = false, out = nil}} | |
local currentResult | |
copies = (type(copies) == "table") and copies or {} |
NewerOlder