Anonymous user
Module:TableTools: Difference between revisions
fix the valueUnion function for NaNs (and make it a lot simpler to boot)
(remove shallowClone - hardly worth having this in here) |
(fix the valueUnion function for NaNs (and make it a lot simpler to boot)) |
||
Line 17:
local infinity = math.huge
local checkType = libraryUtil.checkType
local nan = {}▼
--[[
Line 140 ⟶ 137:
function p.valueUnion(...)
local lim = select('#', ...)
if lim
error(
end
local
for i = 1, lim do
local t = select(i, ...)
checkType('valueUnion', i, t, 'table')
for k, v in pairs(t) do
if
elseif not exists[v] then
ret[#ret + 1] = v
end
▲ vals[v] = true
end
▲ ret[#ret + 1] = val
end
return ret
|