function t.interface(M)assert(checkInterface(M))return function(L)local o=t.table(L)if o==false then return false end for M,o in pairs(M)do local F=o(L[M])if F==false then return false end end return true end end
--[[**
		ensures value matches given interface definition

		@param checkTable The interface definition

		@returns A function that will return true iff the condition is passed
	**--]]
function t.interface(checkTable)
	assert(checkInterface(checkTable))
	return function(value)
		local tableSuccess = t.table(value)
		if tableSuccess == false then
			return false
		end

		for key, check in pairs(checkTable) do
			local success = check(value[key])
			if success == false then
				return false
			end
		end

		return true
	end
end
