lua-users home
lua-l archive

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


> Any nicer ways?

local function traverse(p)
  if p then
    ...
    return traverse(p.next)
  end
end

It will be slower than a while loop (due to the function call) and it
can not be "inlined" as it were, but I like such constructs!

--
Wim