Exemplo n.º 1
0
def test_iter():
    ls = PList(1)
    ls = ls.cons(2)
    items = list(iter(ls))
    assert items == [2, 1]
Exemplo n.º 2
0
def test_cons():
    ls = PList(1)
    ls = ls.cons(2)
    first_item = ls.first
    assert first_item == 2