Guest User

Untitled

a guest
Oct 22nd, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. (de treeize (A)
  2. (make
  3. (link (pop 'A))
  4. (loop
  5. (NIL A)
  6. (T (< (car A) (last (made))))
  7. (if (or (> (car A) (last (made)))
  8. (> (cadr A) (last (made))) )
  9. (link (cons (pop 'A) (treeize A)))
  10. (link (pop 'A)) ) ) ) )
  11.  
  12. (traceAll)
  13. (println (treeize '(0 0 1 1 1 2 3 3 4 5 5 3 2 1 1 0)))
  14. (bye)
Add Comment
Please, Sign In to add comment