fmsl/std/array.lua

15 lines
319 B
Lua

-- Concatenate multiple arrays into a new table, in order
-- @param ...: Table
-- @return Table
function table.concat_new(...)
local result = {}
for _, array in ipairs({...}) do
if array then
for _, value in ipairs(array) do
table.insert(result, value)
end
end
end
return result
end