예제 #1
0
 def test_right_applicative_3(self) -> None:
     a = Right.pure(lambda x, y: x + y).apply(Right(42)).apply(
         Left("error"))
     self.assertEqual(a, Left("error"))
예제 #2
0
파일: test_either.py 프로젝트: cbenz/OSlash
 def test_right_applicative_3(self):
     a = Right.pure(lambda x, y: x+y).apply(Right(42)).apply(Left("error"))
     self.assertEquals(a, Left("error"))
예제 #3
0
 def test_right_applicative_1(self) -> None:
     a = Right.pure(lambda x, y: x + y).apply(Right(2)).apply(Right(40))
     self.assertNotEqual(a, Left(42))
     self.assertEqual(a, Right(42))
예제 #4
0
파일: test_either.py 프로젝트: cbenz/OSlash
 def test_right_applicative_1(self):
     a = Right.pure(lambda x, y: x+y).apply(Right(2)).apply(Right(40))
     self.assertNotEquals(a, Left(42))
     self.assertEquals(a, Right(42))