[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Conventional name proposal: merge
- From: Javier Guerra Giraldez <javier@...>
- Date: Fri, 14 Dec 2012 09:30:14 -0500
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