function t.map(F,q)assert(t.callback(F),t.callback(q))local Z=t.keys(F)local s=t.values(q)return function(F)local q,Q=Z(F)if not q then return false,Q or""end local N,t=s(F)if not N then return false,t or""end return true end end

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

	return function(value)
		local keySuccess, keyErr = keyChecker(value)
		if not keySuccess then
			return false, keyErr or ""
		end

		local valueSuccess, valueErr = valueChecker(value)
		if not valueSuccess then
			return false, valueErr or ""
		end

		return true
	end
end
