Re: Conventional name proposal: merge
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Conventional name proposal: merge
- From: Egil Hjelmeland <privat@...>
- Date: 2012年12月14日 11:28:51 +0100
Den 2012年12月14日 07:19, skrev Dirk Laurie:
merge(...): returns a new table containing all the pairs from all the
tables given as arguments. In particular, if there is only one argument,
returns a shallow copy. In case of duplicate keys, later values
replace earlier ones. Nil arguments are treated as empty tables.
The documentation is much longer than the code!
I like it. Simple, generic, works for both array-like and dict-like tables.
Maybe also merge_rev(...) : Processing (...) backwards, giving
precedence to earlier tables in (...) .
Egil