function t.tuple(...)local q={...}return function(...)local B={...}for j=1,#q,1 do local S,D=q[j](B[j])if S==false then return false,string.format("\066\097\100 \116\117\112\108\101 \105\110\100\101\120 \035\037\100\058\n\t\037\115",j,D or"")end end return true end end
--[[**
	matches given tuple against tuple type definition

	@param ... The type definition for the tuples

	@returns A function that will return true iff the condition is passed
**--]]
function t.tuple(...)
	local checks = { ... }
	return function(...)
		local args = { ... }
		for i = 1, #checks do
			local success, errMsg = checks[i](args[i])
			if success == false then
				return false, string.format("Bad tuple index #%d:\n\t%s", i, errMsg or "")
			end
		end
		return true
	end
end
