Jump to content

Module:table/isSubsetMap

Wiktionary වෙතින්


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
"https://si.wiktionary.org/w/index.php?title=Module:table/isSubsetMap&oldid=221476" වෙතින් සම්ප්‍රවේශනය කෙරිණි