lua-users home
lua-l archive

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


On Fri, Aug 1, 2014 at 11:38 AM, Patrick Donnelly <batrick@batbytes.com> wrote:

table.icopy(from_tbl [, from_idx [, num_elements [, to_tbl [, to_idx ]]]])

Defaults:

from_idx = 1
num_elements = #from_tbl - from_idx + 1
to_tbl = {}
to_idx = #to_tbl


This is exactly how I would expect a copy function to work without reading the documentation. I was surprise to see self-copy as the default.