Changes
clone tn rather than returning an altered tn
error("only one argument passed to 'complement' (minimum is two)", 2)
end
--[[
-- Now we know that we have at least two sets.
-- First, get all the key/value pairs in tn. We can't simply make ret equal to tn, -- as that will affect the value of tn for the whole module. --]] local ret tn = select(lim, ...) checkType('complement', lim, rettn, 'table') local ret = {} for k, v in pairs(tn) do ret[k] = v end -- Remove all the key/value pairs in t1, t2, ..., tn-1.
for i = 1, lim - 1 do
local t = select(i, ...)