def test_just_applicative_3(self): a = Just.pure(lambda x, y: x+y).apply(Just(42)).apply(Nothing()) self.assertEqual(a, Nothing())
def test_just_applicative_3(self): a = Just.pure(lambda x, y: x+y).apply(Just(42)).apply(Nothing()) self.assertEquals(a, Nothing())
def test_just_applicative_1(self): a = Just.pure(lambda x, y: x + y).apply(Just(2)).apply(Just(40)) self.assertNotEquals(a, Nothing()) self.assertEquals(a, Just(42))