[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

advise macro



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