def test_applicative_2nd_low(self): seq = Seq(1, 2, 3, 4, 5) def identity(x): return x self.assertEqual(seq.ap(Seq(identity)), seq)
def test_applicative_1st_low(self): seq = Seq(1, 2, 3, 4, 5) def f(x): return x + 1 self.assertEqual(seq.ap(Seq(f)), seq.map(f))