Search
 
SCRIPT & CODE EXAMPLE
 

LUA

copy table lua

function copy(obj, seen)
  if type(obj) ~= 'table' then return obj end
  if seen and seen[obj] then return seen[obj] end
  local s = seen or {}
  local res = setmetatable({}, getmetatable(obj))
  s[obj] = res
  for k, v in pairs(obj) do res[copy(k, s)] = copy(v, s) end
  return res
end
Comment

PREVIOUS NEXT
Code Example
Lua :: roblox get how many players in server 
Lua :: local in script lua local 
Lua :: svelte template vite 
Lua :: lua variables 
Lua :: when do true loop on roblox lua 
Lua :: lua loop through string 
Lua :: 1.2 / 1.6 
Lua :: roblox player left 
Lua :: Lua dynamic variable name 
Lua :: lua add to table 
Lua :: how to detect collision in roblox studio 
Matlab :: find location of max value in array matlab 
Matlab :: matlab symbolic set value 
Matlab :: how to run a p code matlab 
Matlab :: octave a:b:c range 
Basic :: personal access token 
Basic :: visual basic how to determine if an array already contains an item 
Elixir :: elixir random number 
Elixir :: elixir timex format 
Elixir :: elixir string show inner binary 
Scala :: new scala project 
Scala :: how to print message in scala 
Excel :: google query select first 10 
Excel :: AND logic in excel formula 
Perl :: perl 
Pascal :: pascal delay 
Powershell :: Auto-open DevTools on every new tab For powershell on Windows 
Clojure :: folding at home linuxserver.io 
Assembly :: ror loading webview: Error: Could not register service workers: InvalidStateError: Failed to register a ServiceWorker: The document is in an invalid state.. 
Assembly :: 2su.communications.syr.edu]2su.communications.syr.edu 
ADD CONTENT
Topic
Content
Source link
Name
5+3 =