Upon leaving a function that is being traced, *traced-results*
is bound to the list of results from the function. *traced-results*
is then printed after the function name in the output from tracing. It is accessible in the :after
forms to trace. However care should be used when manipulating this variable, since it is the value of *traced-results*
itself that is used when returning from the traced function. Thus if this value is altered by the :after
forms then the caller of the traced function receives the altered results.
USER 5 > (trace (ceiling
:after
((setq *traced-results*
(mapcar #'1- *traced-results*)))))
CEILING
USER 6 > (multiple-value-call #'+ (ceiling 4 3))
0 CEILING > (4 3)
0 CEILING < (2 -2)
(1 -3)
-2
LispWorks User Guide and Reference Manual - 13 Feb 2015