Module:table/listToSet

Wiktionary වෙතින්

--[[
	{ "a", "b", "c" } -> { ["a"] = true, ["b"] = true, ["c"] = true }
--]]
return function(t)
	-- checkType("listToSet", 1, t, "table")
	
	local set = {}
	for _, item in ipairs(t) do
		set[item] = true
	end
	return set
end
"https://si.wiktionary.org/w/index.php?title=Module:table/listToSet&oldid=42468" වෙතින් සම්ප්‍රවේශනය කෙරිණි