[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Question about methods
- To: commonloops.pa@Xerox.COM
- Subject: Question about methods
- From: Arun Welch <welch@cis.ohio-state.edu>
- Date: Wed, 3 Jan 90 14:02:27 -0500
- Redistributed: commonloops.pa
Given a method, I'd like to put a wrapper on it such that the result
of calling the method is printed out to *trace-output*. This is
analogous to giving an after advice to a function (at least in the
lisps I'm familiar with). Is there some way for an after method to get
the results of the previous computation, or is the right way to do it
to use an around method as follows:
(defmethod foo :around ((bar some-object))
(prog ((result (call-next-method)))
(print result *trace-output*)
result))
The behaviour I'm looking for would be analogous to
(advise foo :after '(print value *trace-output*))
...arun