lua-users home
lua-l archive

Re: Conventional name proposal: merge

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


On Fri, Dec 14, 2012 at 4:28 AM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
> `merge` returns a new table. No argument table is changed.
in my typical Lua toolbox, i put an update equivalent (called merge,
thou) that returns the first argument mutated. if i want the shallow
copy functionality (that's pretty common), i just do
netable = merge ({}, oldtable)
so i can have it both ways
--
Javier

AltStyle によって変換されたページ (->オリジナル) /