Module:TableTools: Difference between revisions

From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
use select rather than {...}
(p.affixNums: move the pattern-generating code out of the loop)
(use select rather than {...})
Line 46:
--]]
function p.union(...)
local tables = {...}
local vals, ret = {}, {}
for _,i t= in1, ipairsselect(tables'#', ...) do
local t = select(i, ...)
for k, v in pairs(t) do
if type(v) == 'number' and tostring(v) == '-nan' then
Line 77:
--]]
function p.intersection(...)
local tables = {...}
local vals, ret = {}, {}
local lim = #tables
for _,i t= in1, ipairsselect(tables'#', ...) do
local t = select(i, ...)
for k, v in pairs(t) do
if type(v) == 'number' and tostring(v) == '-nan' then
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu