[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
About TRACE
- To: info-macl@cambridge.apple.com
- Subject: About TRACE
- From: bhuiyan@skorpio.usask.ca (Shawkat Bhuiyan)
- Date: Wed, 20 Mar 91 16:30:14 CST
Yesterday posted a mail about trace. Andrew asked to provide an explicit
example.
The following is a test function:
(defun flatten (lst)
(cond ((null lst) nil)
((atom (car lst)) (cons (car lst) (flatten (cdr lst))))
(t (append (flatten (car lst)) (flatten (cdr lst)))) ))
This is what I get with Trace:
? (trace flatten)
NIL
? (flatten '(a b (c (d (f g)))))
Calling (FLATTEN (A B (C #))) inside #<Root Object>
FLATTEN returned (A B C D F ...) inside #<Root Object>
(A B C D F G)
?
Could someone explain what's going on here.
Shawkat Bhuiyan