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