Exemplo n.º 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"))
Exemplo n.º 2
0
 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"))
Exemplo n.º 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))
Exemplo n.º 4
0
 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))