Precendence example
(defclass bar () ())
(defclass baz () ())
(defmethod foo ((x bar)) (format t “I am a bar!~%”))
(defmethod foo ((x baz)) (format t “baz I am!~%”))
(defclass bsub1 (bar baz) ())
(defclass bsub2 (baz bar) ())
(setq b1 (make-instance ’bsub1))
(setq b2 (make-instance ’bsub2))
(foo b1)
I am a bar!
(foo b2)
baz I am!
Previous slide
Next slide
Back to first slide
View graphic version