function t.map(N,k)assert(t.callback(N))assert(t.callback(k))local z=t.keys(N)local L=t.values(k)return function(N)local k=z(N)if not k then return false end local l=L(N)if not l then return false end return true end end

function t.map(keyCheck, valueCheck)
	assert(t.callback(keyCheck))
	assert(t.callback(valueCheck))
	local keyChecker = t.keys(keyCheck)
	local valueChecker = t.values(valueCheck)

	return function(value)
		local keySuccess = keyChecker(value)
		if not keySuccess then
			return false
		end

		local valueSuccess = valueChecker(value)
		if not valueSuccess then
			return false
		end

		return true
	end
end
