Multiple Dispatch
Method you get depends on all arguments
(defclass dot (point)
((size :accessor dot-size :initform 1 :initarg :size)))
(defmethod distance ((from point) (to dot))
(- (pythagonize (point-x from) (point-y from)
(point-x to) (point-y to))
(dot-size to)))
Previous slide
Next slide
Back to first slide
View graphic version