Esempio 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"))
Esempio 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"))
Esempio 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))
Esempio 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))