Changes

Jump to navigation Jump to search

Module:TableTools

45 bytes added, 23:46, 19 December 2013
only allow two or more arguments for the set functions
function p.union(...)
local lim = select('#', ...)
if lim == 0 < 2 then error(lim .. ' argument' .. (lim == 1 and '' or 's') .. "no arguments passed to 'union'(minimum is 2)", 2)
end
local ret, trackArrays = {}, {}
function p.intersection(...)
local lim = select('#', ...)
if lim == 0 < 2 then error(lim .. ' argument' .. (lim == 1 and '' or 's') .. "no arguments passed to 'intersection'(minimum is 2)", 2)
end
local ret, track, pairCounts = {}, {}, {}
function p.complement(...)
local lim = select('#', ...)
if lim == 0 < 2 then error("no arguments passed to lim .. 'complementargument' .. (minimum is two)", 2) elseif lim == 1 then error(and '' or 's') .. "only one argument passed to 'complement' (minimum is two2)", 2)
end
--[[
Anonymous user

Navigation menu