From: james anderson
Subject: a question on method combinations
Date:
Message-ID: <3CF3E3FE.B56AE7A8@setf.de>
i am considering how to define a method combination which threads a
datum through the method groups. something like:
(define-method-combination tripartite-fold ()
((around (:around))
(before (:before))
(primary ())
(after (:after)))
(:arguments controller datum argument)
controller datum
(print (let ((main-form (if (or before after (rest primary))
`(progn ,@(when before
`((setf ,argument
(call-method ,(first before) ,(rest before)))))
,@(when primary
`((setf ,argument
(call-method ,(first primary) ,(rest primary)))))
,@(when after
`((setf ,argument
(call-method ,(first after) ,(rest after))))))
`(call-method ,(first primary) ()))))
(if around `(call-method ,(first around)
(,(rest around)
(make-method ,main-form)))
main-form))))
this appears reasonable, but runs contrary to the allowed use of the
"arguments" forms.
what alternatives are available in the context of
define-method-combination to modify the actual arguments to the
respective methods?
...