コード例 #1
0
ファイル: test_maybe.py プロジェクト: stjordanis/OSlash
 def test_just_applicative_3(self):
     a = Just.pure(lambda x, y: x+y).apply(Just(42)).apply(Nothing())
     self.assertEqual(a, Nothing())
コード例 #2
0
ファイル: test_maybe.py プロジェクト: cbenz/OSlash
 def test_just_applicative_3(self):
     a = Just.pure(lambda x, y: x+y).apply(Just(42)).apply(Nothing())
     self.assertEquals(a, Nothing())
コード例 #3
0
ファイル: test_maybe.py プロジェクト: yuhangwang/OSlash
 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))