lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Borrowing a trick from above, rearranging slightly, and some _G trickery - down to 253

local k,o,n,d=next,type,"table"d=function(a,r,t)if n~=o(a)then return a end t={}r=r or{}r[a]=t for x,y in k,a do x=r[x]or d(x,r)y=r[y]or d(y,r)t[x]=y end return t end _G[n].copy={shallow=function(a,b)b={}for x,y in k,a do b[x]=y end return b end,deep=d}