Common Lisp: how to dynamically wrap existing functions, such as for a profiler? <p>I am new at Lisp, and am trying different things out to improve my skills. I want to write a macro that wraps existing functions so that I can set up before and after forms for these functions, kind of like CLOS's auxilliary methods or Elisp's advice package. The trace function's ability to wrap code dynamically has intrigued me, and it seems useful to be able to do this myself.</p> <p>So, how can I do this? How many ways can I do this? : )</p> <p>Please note that I am using SBCL, and that, for the purposes of this question, I am not interested so much in the "right" way of doing this as I am in adding to my Lisp trick bag.</p>