Anonymous user
Module:TableTools: Difference between revisions
use select rather than {...}
Enwikipedia>Mr. Stradivarius (p.affixNums: move the pattern-generating code out of the loop) |
Enwikipedia>Mr. Stradivarius (use select rather than {...}) |
||
Line 46:
--]]
function p.union(...)
local vals, ret = {}, {}
for
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 vals, ret = {}, {}
local lim = #tables
for
local t = select(i, ...)
for k, v in pairs(t) do
if type(v) == 'number' and tostring(v) == '-nan' then
|