local type = type

return function(list, value)
	value = value or true
	local set = {}
	if type(value) == "function" then
		for i = 1, #list do
			local item = list[i]
			set[item] = value(item)
		end
	else
		for i = 1, #list do
			set[list[i]] = value
		end
	end
	return set
end