anchor.diff: -;; kenobi - portable advise.lisp
  +;; advise.lisp - portable reflective value wrapping for Common Lisp functions
  +
   
   (in-package #:cl-user)
   
  +(eval-when (:compile-toplevel :load-toplevel :execute)
  +  
  +(defpackage #:reflexion
  +  (:use
  +   ;; #:my-trivial-utils.lib.ws
  +   #:cl
  +   ))
  +
  +)
  +
  +(in-package #:reflexion)
  +
  +
   (deftype function-name ()
  +  ;; also defined in my-trivial-utils-lib
     '(or symbol (cons symbol t)))
   
   ;; trivial portable prototype of an 'advise' interface
  
positive.code:   (let ((adv (get-advise name env nil)))
      (cond
        ((and adv (not (eq form (advised-original-function adv))))
         (error "ALREAY ADVISED: ~S => ~S" name adv))
        (t (let ((adv (make-advise-record name env form)))
             (vector-push-extend adv %advise-rec% %advise-expand%)
             (values adv))))))
  
negative.code: 
  #+test (quux 5)
  
  (macroexpand (quote
  (defadvise-macro quux (%arg)
    :before (lambda (%argtoo)
              (frob-trace "GOT ARGTOO BEFORE ~s" %argtoo))
    :after  (lambda (%argtoo)
              (frob-trace "GOT ARGTOO AFTER ~s" %argtoo))
    )
  ))             
  
  #+test (quux 12)
  ;; ^FIXME: *trace-output* shows order of eval: :BEFORE, :AFTER, :DURING
  