[Openmcl-devel] tracing recursion with ccl

◒ Simon Lucas ◒ simon at spiral.co.uk
Thu Jul 7 15:01:19 PDT 2016


CCL's built-in trace does not seem to trace repeated calls to a recursive function call. Not in the way I expected.

Is this correct? I need to get a better idea what is going as I work through examples.  Do I need to write a version of Winston/Horn's our-trace?


(defun trim-head (l n)
  (cond ((zerop n) nil)
        (t (cons (car l) (trim-head (cdr l) (- n 1))))))

? (trace trim-head)
NIL
? (trim-head '(a s d f g h j k l) 3)
0> Calling (TRIM-HEAD (A S D F G H J K L) 3) 
<0 TRIM-HEAD returned (A S D)
(A S D)
? 





More information about the Openmcl-devel mailing list