Christophe
Weblog
Wiki
Code
Publications
Music
projects
/
specializable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
call NO-APPLICABLE-METHOD in the appropriate place
[specializable.git]
/
signum-specializer.lisp
diff --git
a/signum-specializer.lisp
b/signum-specializer.lisp
index a5d21fa2d5ca1b2c026813a3f60384d34dbe42bb..ab7c0de346b2470adf65d7fee5c03b4ef93470f1 100644
(file)
--- a/
signum-specializer.lisp
+++ b/
signum-specializer.lisp
@@
-63,7
+63,10
@@
(defmethod fact ((n (signum 0))) 1)
(defmethod fact ((n (signum 1))) (* n (fact (1- n))))
(assert (eql (fact 6) 720))
(defmethod fact ((n (signum 0))) 1)
(defmethod fact ((n (signum 1))) (* n (fact (1- n))))
(assert (eql (fact 6) 720))
- (assert (eql (fact 6.0) 720.0))))
+ (assert (eql (fact 6.0) 720.0))
+ (defmethod no-applicable-method ((gf (eql #'fact)) &rest args)
+ 'gotcha)
+ (assert (eql (fact -6) 'gotcha))))
(eval
'(progn
(eval
'(progn