Then, returning index seems the most consistent.
table.remove takes index and returns value, so table.insert can take value and
----- Original Message -----
Sent: Monday, December 21, 2009 4:52
Subject: Re: about table.insert return
On Sun, Dec 20, 2009 at 10:05 AM, Ico <email@example.com> wrote:
> I guess the other
'logical' behaviour would be to return the newly
> inserted element
instead of the table:
> thing = table.insert(sometable,
> Maybe neither is implemented because they're both
equaly logical ?
I'd say that returning the item being inserted is at
with table.remove, which returns the removed
Of course, one can always write a wrapper around table.insert
return anything desired.