Can you convert a table into a vararg without unpack?
snippet in lua

Can you convert a table into a vararg without unpack?

user2522

local unpackTable do 

local function unpackTable_( tab, i, ... )
  if i == 0 then return ... end
  return unpackTable_( tab, i-1, tab[i], ...)
end

unpackTable = function( tab )
  return unpackTable_(tab, #tab)
end

end

foo = {1, 2, 3}
print(unpackTable(foo))