# HG changeset patch # User Steve Losh # Date 1458906586 0 # Node ID d2aa6ee9382a5d84cdf4fd18c9010495252553af # Parent 4b07fbd81ee2544378a89fa8821ad2a865b44214 Use switch instead of cond, it's cleaner diff -r 4b07fbd81ee2 -r d2aa6ee9382a src/wam.lisp --- a/src/wam.lisp Fri Mar 25 11:49:06 2016 +0000 +++ b/src/wam.lisp Fri Mar 25 11:49:46 2016 +0000 @@ -111,13 +111,15 @@ ;;;; Heap (defun heap-debug (addr cell) - (cond - ((= +tag-reference+ (cell-type cell)) - (if (= addr (cell-value cell)) - "unbound variable" - "variable pointer")) - ((= +tag-functor+ (cell-type cell)) - (format nil "functor/~D" (cell-functor-arity cell))) + (switch ((cell-type cell)) + (+tag-reference+ + (if (= addr (cell-value cell)) + "unbound variable" + (format nil "var pointer to ~D" (cell-value cell)))) + (+tag-functor+ + (format nil "~A/~D" + (cell-functor-name cell) + (cell-functor-arity cell))) (t ""))) (defun dump-heap (heap from to highlight)