// test-list.txt

to prlist a =
  if a == NIL break
  if isatom a
    print car a space break
  else
    printc  40 // (
    while a != NIL
      prlist car a
      a = cdr a
    printc 41 // )

to testList | a b c d e f =
  init_list
  a = newatom 1 0
  b = newatom 2 0
  c = list a
  c = cons b c
  prlist c nl
  d = list c
  prlist d nl
  e = newatom 3 0
  f = append d e
  prlist f nl
  prlist car f nl
  prlist cdr f nl
  prlist cdr car f nl


testList

