lua-users home
lua-l archive

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


The definition of clone is wrong, because it doesn't keep the tag of the
object table; you can forget about curry and instead use

-- clone: Make a shallow copy of a table, including any tag
--   t: table
-- returns
--   u: copy of table
function clone(t)
  return merge(t, {})
end

-- 
http://sc3d.org/rrt/ | Analogy is a midwife, identity a murderer