lua-users home
lua-l archive

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


On Wed, Jun 10, 2009 at 12:40 PM, Henk Boom<henk@henk.ca> wrote:
> local tbl = {... ..., 7, 8, 9}
>
> would be a bit strange, no?

I don't know, I could grow to like it.

Consider the following two hypothetical code lines:

local tbl = {1, 2, 3, ..., 7, 8, 9}

local tbl = {1, 2, 3, ... ..., 7, 8, 9}

The double ellipsis can be read as a larger insertion (i.e. not just
one element) into the list than the single ellipsis.