--f201
local function intersact(a,b)
for k,c in pairs(b) do
a[k] = nil
end
return a
end
local function toS(set)
local l = {}
for _ in pairs(set) do
l[#l+1] = tostring(_)
end
return "{"..table.concat(l,", ").."}"
end
ms = {}
ms.__sub = intersact
local function Table_New(l)
local t = {}
for k,c in ipairs(l) do
t[c] = true
end
setmetatable(t,ms)
return t
end
--f202
local function len(set)
return #set
end
ms.__len = len
Lua程序设计第4版第20章练习答案
最新推荐文章于 2022-03-27 00:16:38 发布