In PiL ed 3, Section 6.3 on Proper Tail Calls it says the only calls that follow the following form are proper tail calls:
return func(args)
Would the following statements fit that form or not?
local function _map(func, key, tbl)
local nextKey = next(tbl, key)
if not nextKey then
return
else
return func(tbl[nextKey]), _map(func, nextKey, tbl)
end
end
function Map(func, ...)
return _map(func, nil, {...})
end