[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: table.maxn...
- From: Dirk Laurie <dirk.laurie@...>
- Date: Mon, 1 Jun 2015 14:25:33 +0200
2015-06-01 12:06 GMT+02:00 Tim Hill <drtimhill@gmail.com>:
> 1. Scan the array part of the table (1 to some arbitrary N). If any entry is
> nil, return false now; it’s not a sequence.
If "some arbitrary N" means "the current size of the array part", N will
in current implementation (ltable.c) always be a power of 2 such that
at least half the slots are in use. In other words, up to half the slots
may be nil. You can only conclude it is not a sequence if an entry is nil
but some later entry is not.