[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
advise macro
- To: info-mcl%cambridge.apple.com@kddlab.kddlabs.co.jp
- Subject: advise macro
- From: ueda@shpcsl.sharp.co.jp (UEDA masaya)
- Date: Thu, 20 Aug 92 15:27:37 JST
Dear MCLers:
I tried advice macro of MCL 2.0 final.
I could add advices to some functions and methods except for
individual method.
Can advise macro treat individual methods? Any suggestions are welcom.
--------------------
? (defmethod fact ((x integer))
(declare (optimize (debug 3)))
(* x (fact (1- x))))
#<STANDARD-METHOD FACT (INTEGER)>
? (defmethod fact ((x (eql 0))) 1)
#<STANDARD-METHOD FACT ((EQL 0))>
? (advise (:method fact (integer)) (print arglist))
#<METHOD-FUNCTION FACT (INTEGER)>
? (advise (:method fact ((eql 0))) (print arglist))
> Error: Class named (EQL 0) not found.
> While executing: FIND-CLASS
> Type Command-. to abort.
See the RestartsI menu item for further choices.
1 >
Aborted
? (find-method #'fact nil '((eql 0)) nil)
#<STANDARD-METHOD FACT ((EQL 0))>
?
--- Thanks ---
Masaya UEDA
Information System R&D Center, SHARP Co.
2613-1 Ichinomoto, Tenri, Nara 632, JAPAN