lua-users home
lua-l archive

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

On Tue, Apr 17, 2012 at 11:09 AM, Robert Virding
<> wrote:
> I think the main problem is that you cannot "see" from the value of #t is a proper sequence or not, or if there is a proper subsequence. #t always returns a "valid looking" result even if the table is not valid table and the value is basically meaningless. To me that is the problem.

function table.issequence(t)
    for i = 1, #t do
        if t[i] == nil then return false end
    return true