[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: create list start from index 0 with table
- From: "Javier Guerra" <javier@...>
- Date: Mon, 23 Jun 2008 09:10:14 -0500
On Mon, Jun 23, 2008 at 8:58 AM, Ong hean kuan <mysurface@gmail.com> wrote:
> Duncan:
> Although I am not completely clear why ipairs({}), t, -1 works, but I will
> read the iterators chapter again.
iterators return 3 parameters to the "for" statement. the first one
is a function. both ipairs() and pairs() have a private function that
they use for that (that is, it isn't a closure created each time).
duncan's ipairs2() simply borrows ipairs()'s stepping function at
startup time.
--
Javier