Example #1
0
 def pure(a): return cons(a, nil)
 self.assertEqual(
Example #2
0
 def pure(a): return cons(a, nil)
 def add1M(x): return pure(x + 1)
Example #3
0
 def pure(a): return cons(a, nil)
 def funcApp(a): return lambda f: f(a)
Example #4
0
 def pure(a): return cons(a, nil)
 def add1(x): return x + 1
Example #5
0
 def test_eq_cons(self):
     self.assertEqual(
         cons(1, cons(2, cons(3, nil))),
         toLinkedList([1, 2, 3])
     )