At 14/11/00 12:15 +0100, David Kaasen wrote:
>...
Hello,
In your example you probably should do:
(defclass a () ())
;;;> #<standard-class a>
(defmethod add ((self a) &rest r)
(values self r))
;;;> #<standard-method add (a)>
(defclass b () ())
;;;> #<standard-class b>
(defmethod add ((self b) &rest r)
(values self r))
;;;> #<standard-method add (b)>
(add (make-instance 'a) 0 1 2)
;;;1.> #<a @ #x23cc2b4a>
;;;2.> (0 1 2)
Consider also the use of &optional , &key and &allow-other-keys. Look at my
home page for Lisp resources and books. For CLOS and object oriented design
you can't avoid the reading of Sonya E. Keene book.
Francis Leboutte
www.algo.be
Visit www.climatevoice.org and take action