--- Combines two or more numerically indexed tables into one.
-- @param tbl1 Table value to combine
-- @param tbl2 Table value to combine
--- @param tblN More values to combine
+-- @param ... More tables to combine
-- @return Table value containing all values of given tables
function combine(...)
local result = {}
--- Create a dynamic table which automatically creates subtables.
-- @return Dynamic Table
-function create_dtable()
+function dtable()
return setmetatable({}, { __index =
function(tbl, key)
return rawget(tbl, key)
- or rawget(rawset(tbl, key, create_dtable()), key)
+ or rawget(rawset(tbl, key, dtable()), key)
end
})
end