본문으로 이동

모듈:table/isSubsetMap

위키낱말사전, 말과 글의 누리

이 모듈에 대한 설명문서는 모듈:table/isSubsetMap/설명문서에서 만들 수 있습니다

local pairs = pairs

--[==[
Returns true if the first map, taken as a set, is a subset of the second map, taken as a set.]==]
return function(t1, t2)
	for k in pairs(t1) do
		if t2[k] == nil then
			return false
		end
	end
	return true
end