return function()local N=require(script.Parent.Parent.FunctionUtils.returnArgs)local R=require(script.Parent.Parent.FunctionUtils.void)local z=require(script.Parent)local V=N(true)local x=N(false)local b=N(nil)local function q() end it("\115\104\111\117\108\100 \098\101 \097 \116\097\098\108\101",function()(expect(z)).to.be.a("\116\097\098\108\101")end)it("\115\104\111\117\108\100 \110\111\116 \099\111\110\116\097\105\110 \097 \109\101\116\097\116\097\098\108\101",function()(expect(getmetatable(z))).to.equal(nil)end)it("\115\104\111\117\108\100 \116\104\114\111\119 \097\110 \101\114\114\111\114 \116\111 \109\111\100\105\102\121 \116\104\101 \101\120\112\111\114\116\101\100 \116\097\098\108\101",function()(expect(function()(getmetatable(z)).__index={}end)).to.throw();(expect(function()setmetatable(z,{})end)).to.throw();(expect(function()z.NEW_FIELD={}end)).to.throw()end)describe("\079\107",function()it("\115\104\111\117\108\100 \116\104\114\111\119 \097\110 \101\114\114\111\114 \111\110 \097\116\116\101\109\112\116 \116\111 \109\111\100\105\102\121 \116\104\101 \079\107 \116\097\098\108\101",function()(expect(function()(getmetatable(z.Ok())).__index={}end)).to.throw();(expect(function()setmetatable(z.Ok(),{})end)).to.throw();(expect(function()(z.Ok()).NEW_FIELD={}end)).to.throw()end)it("\115\104\111\117\108\100 \112\114\105\110\116 \097 \110\105\099\101 \115\116\114\105\110\103 \105\110\115\116\101\097\100 \111\102 \097 \116\097\098\108\101",function()(expect(function()assert(tostring(z.Ok())=="\079\107\060\110\105\108\062")assert(tostring(z.Ok(1))=="\079\107\060\110\117\109\098\101\114\062")assert(tostring(z.Ok(CFrame.identity))=="\079\107\060\067\070\114\097\109\101\062")end)).never.to.throw()end)it("\115\104\111\117\108\100 \105\109\112\108\101\109\101\110\116 \095\095\101\113 \109\101\116\097\109\101\116\104\111\100",function()(expect(function()assert(z.Ok()==z.Ok())assert(z.Ok(0)==z.Ok(0))end)).never.to.throw()end)end)describe("\069\114\114",function()it("\115\104\111\117\108\100 \116\104\114\111\119 \097\110 \101\114\114\111\114 \111\110 \097\116\116\101\109\112\116 \116\111 \109\111\100\105\102\121 \116\104\101 \069\114\114 \116\097\098\108\101",function()(expect(function()(getmetatable(z.Err())).__index={}end)).to.throw();(expect(function()setmetatable(z.Err(),{})end)).to.throw();(expect(function()(z.Err()).NEW_FIELD={}end)).to.throw()end)it("\115\104\111\117\108\100 \112\114\105\110\116 \097 \110\105\099\101 \115\116\114\105\110\103 \105\110\115\116\101\097\100 \111\102 \097 \116\097\098\108\101",function()(expect(function()assert(tostring(z.Err())=="\069\114\114\060\110\105\108\062")assert(tostring(z.Err(0))=="\069\114\114\060\110\117\109\098\101\114\062")assert(tostring(z.Err(CFrame.identity))=="\069\114\114\060\067\070\114\097\109\101\062")end)).never.to.throw()end)it("\115\104\111\117\108\100 \105\109\112\108\101\109\101\110\116 \095\095\101\113 \109\101\116\097\109\101\116\104\111\100",function()(expect(function()assert(z.Err()==z.Err())assert(z.Err(0)==z.Err(0))assert(z.Err()~=z.Err(0))assert(z.Err()~=z.Ok())assert(z.Err(0)~=z.Ok(0))end)).never.to.throw()end)end)describe("\058\105\115\079\107\040\041",function()it("\115\104\111\117\108\100 \114\101\099\111\103\110\105\122\101 \079\107",function()(expect(function()assert((z.Ok()):isOk()==true)end)).never.to.throw()end)it("\115\104\111\117\108\100 \114\101\099\111\103\110\105\122\101 \069\114\114",function()(expect(function()assert((z.Err()):isOk()==false)end)).never.to.throw()end)end)describe("\058\105\115\079\107\065\110\100\040\041",function()it("\115\104\111\117\108\100 \114\101\099\111\103\110\105\122\101 \079\107",function()(expect(function()assert((z.Ok()):isOkAnd(x)==false)assert((z.Ok()):isOkAnd(V)==true)end)).never.to.throw()end)it("\115\104\111\117\108\100 \114\101\099\111\103\110\105\122\101 \069\114\114",function()(expect(function()assert((z.Err()):isOkAnd(x)==false)assert((z.Err()):isOkAnd(V)==false)end)).never.to.throw()end)it("\115\104\111\117\108\100 \110\111\116 \099\097\108\108 \'\102\' \102\117\110\099\116\105\111\110 \119\104\101\110 \082\101\115\117\108\116 \105\115 \069\114\114",function()(expect(function()(z.Err()):isOkAnd(error)end)).never.to.throw()end)it("\115\104\111\117\108\100 \112\114\111\118\105\100\101 \097 \118\097\108\105\100 \118\097\108\117\101 \116\111 \'\102\' \102\117\110\099\116\105\111\110",function()(expect(function()(z.Ok(0)):isOkAnd(function(N)assert(N==0)return true end);(z.Ok()):isOkAnd(function(N)assert(N==nil)return true end)end)).never.to.throw()end)end)describe("\058\105\115\069\114\114\040\041",function()it("\115\104\111\117\108\100 \114\101\099\111\103\110\105\122\101 \069\114\114",function()(expect(function()assert((z.Err()):isErr()==true)end)).never.to.throw()end)it("\115\104\111\117\108\100 \114\101\099\111\103\110\105\122\101 \079\107",function()(expect(function()assert((z.Ok()):isErr()==false)end)).never.to.throw()end)end)describe("\058\105\115\069\114\114\065\110\100\040\041",function()it("\115\104\111\117\108\100 \114\101\099\111\103\110\105\122\101 \069\114\114",function()(expect(function()assert((z.Err()):isErrAnd(V)==true)assert((z.Err()):isErrAnd(x)==false)end)).never.to.throw()end)it("\115\104\111\117\108\100 \114\101\099\111\103\110\105\122\101 \079\107",function()(expect(function()assert((z.Ok()):isErrAnd(V)==false)assert((z.Ok()):isErrAnd(x)==false)end)).never.to.throw()end)it("\115\104\111\117\108\100 \110\111\116 \099\097\108\108 \'\102\' \102\117\110\099\116\105\111\110 \119\104\101\110 \082\101\115\117\108\116 \105\115 \079\107",function()(expect(function()(z.Ok()):isErrAnd(error)end)).never.to.throw()end)end)describe("\058\111\107\040\041",function()return end)describe("\058\101\114\114\040\041",function()return end)describe("\058\109\097\112\040\041",function()it("\115\104\111\117\108\100 \109\097\112 \079\107 \116\111 \097\110\111\116\104\101\114 \079\107",function()(expect(function()assert((z.Ok()):map(V)==z.Ok(true))assert((z.Ok(true)):map(b)==z.Ok())end)).never.to.throw()end)it("\115\104\111\117\108\100 \110\111\116 \109\097\112 \069\114\114",function()(expect(function()(z.Err()):map(error)end)).never.to.throw()end)it("\115\104\111\117\108\100 \110\111\116 \099\097\108\108 \'\111\112\' \102\117\110\099\116\105\111\110 \119\104\101\110 \099\097\108\108\101\100 \111\110 \069\114\114",function()(expect(function()(z.Err()):map(error)end)).never.to.throw()end)end)describe("\058\109\097\112\079\114\040\041",function()it("\115\104\111\117\108\100 \109\097\112 \069\114\114 \116\111 \'\100\101\102\097\117\108\116\' \118\097\108\117\101",function()(expect(function()assert((z.Err()):mapOr(0,q)==0)assert((z.Err(200)):mapOr(nil,q)==nil)end)).never.to.throw()end)it("\115\104\111\117\108\100 \109\097\112 \079\107 \116\111 \118\097\108\117\101 \114\101\116\117\114\110\101\100 \102\114\111\109 \'\102\' \102\117\110\099\116\105\111\110",function()(expect(function()assert((z.Ok()):mapOr(nil,V)==true)end)).never.to.throw()end)it("\115\104\111\117\108\100 \110\111\116 \116\104\114\111\119 \097\110 \101\114\114\111\114 \119\104\101\110 \115\105\110\103\108\101 \118\097\108\117\101 \114\101\116\117\114\110\101\100 \102\114\111\109 \'\102\' \102\117\110\099\116\105\111\110",function()(expect(function()assert((z.Ok()):mapOr(nil,V)==true)assert((z.Ok()):mapOr(nil,x)==false)end)).never.to.throw()end)it("\115\104\111\117\108\100 \110\111\116 \099\097\108\108 \'\102\' \102\117\110\099\116\105\111\110 \119\104\101\110 \099\097\108\108\101\100 \111\110 \069\114\114",function()(expect(function()assert((z.Err()):mapOr(true,error)==true)assert((z.Err()):mapOr(nil,error)==nil)end)).never.to.throw()end)end)describe("\058\109\097\112\079\114\069\108\115\101\040\041",function()it("\115\104\111\117\108\100 \109\097\112 \069\114\114 \116\111 \118\097\108\117\101 \114\101\116\117\114\110\101\100 \102\114\111\109 \'\100\101\102\097\117\108\116\' \102\117\110\099\116\105\111\110",function()(expect(function()assert((z.Err()):mapOrElse(V,q)==true)assert((z.Err()):mapOrElse(b,q)==nil)end)).never.to.throw()end)it("\115\104\111\117\108\100 \109\097\112 \079\107 \116\111 \118\097\108\117\101 \114\101\116\117\114\110\101\100 \102\114\111\109 \'\102\' \102\117\110\099\116\105\111\110",function()(expect(function()assert((z.Ok()):mapOrElse(error,V)==true)assert((z.Ok()):mapOrElse(error,b)==nil)end)).never.to.throw()end)it("\115\104\111\117\108\100 \110\111\116 \116\104\114\111\119 \097\110 \101\114\114\111\114 \119\104\101\110 \115\105\110\103\108\101 \118\097\108\117\101 \114\101\116\117\114\110\101\100 \102\114\111\109 \'\100\101\102\097\117\108\116\' \102\117\110\099\116\105\111\110",function()(expect(function()(z.Err()):mapOrElse(V,q);(z.Err()):mapOrElse(b,q)end)).never.to.throw()end)it("\115\104\111\117\108\100 \110\111\116 \116\104\114\111\119 \097\110 \101\114\114\111\114 \119\104\101\110 \115\105\110\103\108\101 \118\097\108\117\101 \114\101\116\117\114\110\101\100 \102\114\111\109 \'\102\' \102\117\110\099\116\105\111\110",function()(expect(function()(z.Ok()):mapOrElse(q,V);(z.Ok()):mapOrElse(q,b)end)).never.to.throw()end)end)describe("\058\109\097\112\069\114\114\040\041",function()it("\115\104\111\117\108\100 \109\097\112 \069\114\114 \116\111 \097\110\111\116\104\101\114 \069\114\114",function()(expect(function()assert((z.Err()):mapErr(function()return 0 end)==z.Err(0))end)).never.to.throw()end)it("\115\104\111\117\108\100 \110\111\116 \109\097\112 \079\107",function()(expect(function()assert((z.Ok()):mapErr(V)==z.Ok())end)).never.to.throw()end)it("\115\104\111\117\108\100 \110\111\116 \116\104\114\111\119 \097\110 \101\114\114\111\114 \119\104\101\110 \115\105\110\103\108\101 \118\097\108\117\101 \114\101\116\117\114\110\101\100 \102\114\111\109 \'\111\112\' \102\117\110\099\116\105\111\110",function()(expect(function()(z.Err()):mapErr(b);(z.Err()):mapErr(V)end)).never.to.throw()end)end)describe("\058\105\110\115\112\101\099\116\040\041",function()it("\115\104\111\117\108\100 \110\111\116 \099\097\108\108 \'\102\' \102\117\110\099\116\105\111\110 \119\104\101\110 \099\097\108\108\101\100 \111\110 \069\114\114",function()(expect(function()(z.Err()):inspect(error)end)).never.to.throw()end)end)describe("\058\105\110\115\112\101\099\116\069\114\114\040\041",function()it("\115\104\111\117\108\100 \110\111\116 \099\097\108\108 \'\102\' \102\117\110\099\116\105\111\110 \119\104\101\110 \099\097\108\108\101\100 \111\110 \079\107",function()(expect(function()(z.Ok()):inspectErr(error)end)).never.to.throw()end)end)describe("\058\101\120\112\101\099\116\040\041",function()it("\115\104\111\117\108\100 \116\104\114\111\119 \097\110 \101\114\114\111\114 \119\104\101\110 \099\097\108\108\101\100 \111\110 \069\114\114",function()(expect(function()(z.Err()):expect("\109\115\103")end)).to.throw()end)end)describe("\058\117\110\119\114\097\112\040\041",function()it("\115\104\111\117\108\100 \116\104\114\111\119 \097\110 \101\114\114\111\114 \119\104\101\110 \099\097\108\108\101\100 \111\110 \069\114\114",function()(expect(function()(z.Err()):unwrap()end)).to.throw()end)end)describe("\058\101\120\112\101\099\116\069\114\114\040\041",function()it("\115\104\111\117\108\100 \116\104\114\111\119 \097\110 \101\114\114\111\114 \119\104\101\110 \099\097\108\108\101\100 \111\110 \079\107",function()(expect(function()(z.Ok()):expectErr("\109\115\103")end)).to.throw()end)end)describe("\058\117\110\119\114\097\112\069\114\114\040\041",function()it("\115\104\111\117\108\100 \116\104\114\111\119 \097\110 \101\114\114\111\114 \119\104\101\110 \099\097\108\108\101\100 \111\110 \079\107",function()(expect(function()(z.Ok()):unwrapErr()end)).to.throw()end)end)describe("\058\097\110\100\082\101\115\040\041",function()it("\115\104\111\117\108\100 \114\101\116\117\114\110 \'\114\101\115\' \097\114\103\117\109\101\110\116 \119\104\101\110 \099\097\108\108\101\100 \111\110 \079\107",function()(expect(function()assert((z.Ok()):andRes(z.Ok(3))==z.Ok(3))end)).never.to.throw()end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \115\101\108\102 \119\104\101\110 \099\097\108\108\101\100 \111\110 \069\114\114",function()(expect(function()assert((z.Err()):andRes(z.Ok())==z.Err())end)).never.to.throw()end)end)describe("\058\097\110\100\084\104\101\110\040\041",function()it("\115\104\111\117\108\100 \114\101\116\117\114\110 \115\101\108\102 \119\104\101\110 \099\097\108\108\101\100 \111\110 \069\114\114",function()(expect(function()assert((z.Err()):andThen(q)==z.Err())end)).never.to.throw()end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \082\101\115\117\108\116 \102\114\111\109 \'\111\112\' \102\117\110\099\116\105\111\110 \119\104\101\110 \099\097\108\108\101\100 \111\110 \079\107",function()(expect(function()assert((z.Ok()):andThen(function()return z.Ok(true)end)==z.Ok(true))end)).never.to.throw()end)end)describe("\058\111\114\082\101\115\040\041",function()it("\115\104\111\117\108\100 \114\101\116\117\114\110 \'\114\101\115\' \105\110 \099\097\115\101 \115\101\108\102 \105\115 \069\114\114",function()(expect(function()assert((z.Err()):orRes(z.Ok())==z.Ok())end)).never.to.throw()end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \115\101\108\102 \105\110 \099\097\115\101 \115\101\108\102 \105\115 \079\107",function()(expect(function()assert((z.Ok()):orRes(z.Err())==z.Ok())end)).never.to.throw()end)end)describe("\058\111\114\069\108\115\101\040\041",function()return end)describe("\058\117\110\119\114\097\112\079\114\040\041",function()return end)describe("\058\117\110\119\114\097\112\079\114\069\108\115\101\040\041",function()it("\115\104\111\117\108\100 \110\111\116 \099\097\108\108 \'\111\112\' \102\117\110\099\116\105\111\110 \119\104\101\110 \099\097\108\108\101\100 \111\110 \069\114\114",function()(expect(function()(z.Ok()):unwrapOrElse(error)end)).never.to.throw()end)end)describe("\058\099\111\110\116\097\105\110\115\040\041",function()it("\115\104\111\117\108\100 \114\101\099\111\103\110\105\122\101 \079\107",function()(expect(function()assert((z.Ok()):contains(nil)==true)assert((z.Ok(0)):contains(0)==true)end)).never.to.throw()end)it("\115\104\111\117\108\100 \114\101\099\111\103\110\105\122\101 \069\114\114",function()(expect(function()assert((z.Err()):contains(nil)==false)assert((z.Err(0)):contains(0)==false)end)).never.to.throw()end)end)describe("\058\099\111\110\116\097\105\110\115\069\114\114\040\041",function()it("\115\104\111\117\108\100 \114\101\099\111\103\110\105\122\101 \069\114\114",function()(expect(function()assert((z.Err()):containsErr(nil)==true)assert((z.Err(0)):containsErr(0)==true)end)).never.to.throw()end)it("\115\104\111\117\108\100 \114\101\099\111\103\110\105\122\101 \079\107",function()(expect(function()assert((z.Ok()):containsErr(nil)==false)assert((z.Ok(0)):containsErr(0)==false)end)).never.to.throw()end)end)end
return function()
	local returnArgs = require(script.Parent.Parent.FunctionUtils.returnArgs)
	local void = require(script.Parent.Parent.FunctionUtils.void)

	local Result = require(script.Parent)

	local RETURN_TRUE = returnArgs(true)
	local RETURN_FALSE = returnArgs(false)
	local RETURN_NIL = returnArgs(nil)
	local function UNREACHABLE() end

	it("should be a table", function()
		expect(Result).to.be.a("table")
	end)

	it("should not contain a metatable", function()
		expect(getmetatable(Result)).to.equal(nil)
	end)

	it("should throw an error to modify the exported table", function()
		expect(function()
			getmetatable(Result).__index = {}
		end).to.throw()

		expect(function()
			setmetatable(Result, {})
		end).to.throw()

		expect(function()
			Result.NEW_FIELD = {}
		end).to.throw()
	end)

	describe("Ok", function()
		it("should throw an error on attempt to modify the Ok table", function()
			expect(function()
				getmetatable(Result.Ok()).__index = {}
			end).to.throw()

			expect(function()
				setmetatable(Result.Ok(), {})
			end).to.throw()

			expect(function()
				Result.Ok().NEW_FIELD = {}
			end).to.throw()
		end)

		it("should print a nice string instead of a table", function()
			expect(function()
				assert(tostring(Result.Ok()) == "Ok<nil>")
				assert(tostring(Result.Ok(1)) == "Ok<number>")
				assert(tostring(Result.Ok(CFrame.identity)) == "Ok<CFrame>")
			end).never.to.throw()
		end)

		it("should implement __eq metamethod", function()
			expect(function()
				assert(Result.Ok() == Result.Ok())
				assert(Result.Ok(0) == Result.Ok(0))
			end).never.to.throw()
		end)
	end)

	describe("Err", function()
		it("should throw an error on attempt to modify the Err table", function()
			expect(function()
				getmetatable(Result.Err()).__index = {}
			end).to.throw()

			expect(function()
				setmetatable(Result.Err(), {})
			end).to.throw()

			expect(function()
				Result.Err().NEW_FIELD = {}
			end).to.throw()
		end)

		it("should print a nice string instead of a table", function()
			expect(function()
				assert(tostring(Result.Err()) == "Err<nil>")
				assert(tostring(Result.Err(0)) == "Err<number>")
				assert(tostring(Result.Err(CFrame.identity)) == "Err<CFrame>")
			end).never.to.throw()
		end)

		it("should implement __eq metamethod", function()
			expect(function()
				assert(Result.Err() == Result.Err())
				assert(Result.Err(0) == Result.Err(0))
				assert(Result.Err() ~= Result.Err(0))
				assert(Result.Err() ~= Result.Ok())
				assert(Result.Err(0) ~= Result.Ok(0))
			end).never.to.throw()
		end)
	end)

	describe(":isOk()", function()
		it("should recognize Ok", function()
			expect(function()
				assert(Result.Ok():isOk() == true)
			end).never.to.throw()
		end)

		it("should recognize Err", function()
			expect(function()
				assert(Result.Err():isOk() == false)
			end).never.to.throw()
		end)
	end)

	describe(":isOkAnd()", function()
		it("should recognize Ok", function()
			expect(function()
				assert(Result.Ok():isOkAnd(RETURN_FALSE) == false)
				assert(Result.Ok():isOkAnd(RETURN_TRUE) == true)
			end).never.to.throw()
		end)

		it("should recognize Err", function()
			expect(function()
				assert(Result.Err():isOkAnd(RETURN_FALSE) == false)
				assert(Result.Err():isOkAnd(RETURN_TRUE) == false)
			end).never.to.throw()
		end)

		it("should not call 'f' function when Result is Err", function()
			expect(function()
				Result.Err():isOkAnd(error)
			end).never.to.throw()
		end)

		it("should provide a valid value to 'f' function", function()
			expect(function()
				Result.Ok(0):isOkAnd(function(v)
					assert(v == 0)
					return true
				end)

				Result.Ok():isOkAnd(function(v)
					assert(v == nil)
					return true
				end)
			end).never.to.throw()
		end)
	end)

	describe(":isErr()", function()
		it("should recognize Err", function()
			expect(function()
				assert(Result.Err():isErr() == true)
			end).never.to.throw()
		end)

		it("should recognize Ok", function()
			expect(function()
				assert(Result.Ok():isErr() == false)
			end).never.to.throw()
		end)
	end)

	describe(":isErrAnd()", function()
		it("should recognize Err", function()
			expect(function()
				assert(Result.Err():isErrAnd(RETURN_TRUE) == true)
				assert(Result.Err():isErrAnd(RETURN_FALSE) == false)
			end).never.to.throw()
		end)

		it("should recognize Ok", function()
			expect(function()
				assert(Result.Ok():isErrAnd(RETURN_TRUE) == false)
				assert(Result.Ok():isErrAnd(RETURN_FALSE) == false)
			end).never.to.throw()
		end)

		it("should not call 'f' function when Result is Ok", function()
			expect(function()
				Result.Ok():isErrAnd(error)
			end).never.to.throw()
		end)
	end)

	describe(":ok()", function()
		return
	end)

	describe(":err()", function()
		return
	end)

	describe(":map()", function()
		it("should map Ok to another Ok", function()
			expect(function()
				assert(Result.Ok():map(RETURN_TRUE) == Result.Ok(true))
				assert(Result.Ok(true):map(RETURN_NIL) == Result.Ok())
			end).never.to.throw()
		end)

		it("should not map Err", function()
			expect(function()
				Result.Err():map(error)
			end).never.to.throw()
		end)

		it("should not call 'op' function when called on Err", function()
			expect(function()
				Result.Err():map(error)
			end).never.to.throw()
		end)
	end)

	describe(":mapOr()", function()
		it("should map Err to 'default' value", function()
			expect(function()
				assert(Result.Err():mapOr(0, UNREACHABLE) == 0)
				assert(Result.Err(200):mapOr(nil, UNREACHABLE) == nil)
			end).never.to.throw()
		end)

		it("should map Ok to value returned from 'f' function", function()
			expect(function()
				assert(Result.Ok():mapOr(nil, RETURN_TRUE) == true)
			end).never.to.throw()
		end)

		it("should not throw an error when single value returned from 'f' function", function()
			expect(function()
				assert(Result.Ok():mapOr(nil, RETURN_TRUE) == true)
				assert(Result.Ok():mapOr(nil, RETURN_FALSE) == false)
			end).never.to.throw()
		end)

		it("should not call 'f' function when called on Err", function()
			expect(function()
				assert(Result.Err():mapOr(true, error) == true)
				assert(Result.Err():mapOr(nil, error) == nil)
			end).never.to.throw()
		end)
	end)

	describe(":mapOrElse()", function()
		it("should map Err to value returned from 'default' function", function()
			expect(function()
				assert(Result.Err():mapOrElse(RETURN_TRUE, UNREACHABLE) == true)
				assert(Result.Err():mapOrElse(RETURN_NIL, UNREACHABLE) == nil)
			end).never.to.throw()
		end)

		it("should map Ok to value returned from 'f' function", function()
			expect(function()
				assert(Result.Ok():mapOrElse(error, RETURN_TRUE) == true)
				assert(Result.Ok():mapOrElse(error, RETURN_NIL) == nil)
			end).never.to.throw()
		end)

		it("should not throw an error when single value returned from 'default' function", function()
			expect(function()
				Result.Err():mapOrElse(RETURN_TRUE, UNREACHABLE)
				Result.Err():mapOrElse(RETURN_NIL, UNREACHABLE)
			end).never.to.throw()
		end)

		it("should not throw an error when single value returned from 'f' function", function()
			expect(function()
				Result.Ok():mapOrElse(UNREACHABLE, RETURN_TRUE)
				Result.Ok():mapOrElse(UNREACHABLE, RETURN_NIL)
			end).never.to.throw()
		end)
	end)

	describe(":mapErr()", function()
		it("should map Err to another Err", function()
			expect(function()
				assert(Result.Err():mapErr(function()
					return 0
				end) == Result.Err(0))
			end).never.to.throw()
		end)

		it("should not map Ok", function()
			expect(function()
				assert(Result.Ok():mapErr(RETURN_TRUE) == Result.Ok())
			end).never.to.throw()
		end)

		it("should not throw an error when single value returned from 'op' function", function()
			expect(function()
				Result.Err():mapErr(RETURN_NIL)
				Result.Err():mapErr(RETURN_TRUE)
			end).never.to.throw()
		end)
	end)

	describe(":inspect()", function()
		it("should not call 'f' function when called on Err", function()
			expect(function()
				Result.Err():inspect(error)
			end).never.to.throw()
		end)
	end)

	describe(":inspectErr()", function()
		it("should not call 'f' function when called on Ok", function()
			expect(function()
				Result.Ok():inspectErr(error)
			end).never.to.throw()
		end)
	end)

	describe(":expect()", function()
		it("should throw an error when called on Err", function()
			expect(function()
				Result.Err():expect("msg")
			end).to.throw()
		end)
	end)

	describe(":unwrap()", function()
		it("should throw an error when called on Err", function()
			expect(function()
				Result.Err():unwrap()
			end).to.throw()
		end)
	end)

	describe(":expectErr()", function()
		it("should throw an error when called on Ok", function()
			expect(function()
				Result.Ok():expectErr("msg")
			end).to.throw()
		end)
	end)

	describe(":unwrapErr()", function()
		it("should throw an error when called on Ok", function()
			expect(function()
				Result.Ok():unwrapErr()
			end).to.throw()
		end)
	end)

	describe(":andRes()", function()
		it("should return 'res' argument when called on Ok", function()
			expect(function()
				assert(Result.Ok():andRes(Result.Ok(3)) == Result.Ok(3))
			end).never.to.throw()
		end)

		it("should return self when called on Err", function()
			expect(function()
				assert(Result.Err():andRes(Result.Ok()) == Result.Err())
			end).never.to.throw()
		end)
	end)

	describe(":andThen()", function()
		it("should return self when called on Err", function()
			expect(function()
				assert(Result.Err():andThen(UNREACHABLE) == Result.Err())
			end).never.to.throw()
		end)

		it("should return Result from 'op' function when called on Ok", function()
			expect(function()
				assert(Result.Ok():andThen(function()
					return Result.Ok(true)
				end) == Result.Ok(true))
			end).never.to.throw()
		end)
	end)

	describe(":orRes()", function()
		it("should return 'res' in case self is Err", function()
			expect(function()
				assert(Result.Err():orRes(Result.Ok()) == Result.Ok())
			end).never.to.throw()
		end)

		it("should return self in case self is Ok", function()
			expect(function()
				assert(Result.Ok():orRes(Result.Err()) == Result.Ok())
			end).never.to.throw()
		end)
	end)

	describe(":orElse()", function()
		return
	end)

	describe(":unwrapOr()", function()
		return
	end)

	describe(":unwrapOrElse()", function()
		it("should not call 'op' function when called on Err", function()
			expect(function()
				Result.Ok():unwrapOrElse(error)
			end).never.to.throw()
		end)
	end)

	describe(":contains()", function()
		it("should recognize Ok", function()
			expect(function()
				assert(Result.Ok():contains(nil) == true)
				assert(Result.Ok(0):contains(0) == true)
			end).never.to.throw()
		end)

		it("should recognize Err", function()
			expect(function()
				assert(Result.Err():contains(nil) == false)
				assert(Result.Err(0):contains(0) == false)
			end).never.to.throw()
		end)
	end)

	describe(":containsErr()", function()
		it("should recognize Err", function()
			expect(function()
				assert(Result.Err():containsErr(nil) == true)
				assert(Result.Err(0):containsErr(0) == true)
			end).never.to.throw()
		end)

		it("should recognize Ok", function()
			expect(function()
				assert(Result.Ok():containsErr(nil) == false)
				assert(Result.Ok(0):containsErr(0) == false)
			end).never.to.throw()
		end)
	end)
end
