Exemple #1
0
def test_cons():
    lst = cons(1, nil)
    assert_equal(lst.hd, 1)
    assert_equal(lst.tl, nil)
Exemple #2
0
def test_one_arg_constructor():
    lst = cons(1)
    assert_equal(lst.hd, 1)
    assert_equal(lst.tl, nil)