<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.kram.nz/index.php?action=history&amp;feed=atom&amp;title=SE701%3Amultiple-dispatch.lisp</id>
	<title>SE701:multiple-dispatch.lisp - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.kram.nz/index.php?action=history&amp;feed=atom&amp;title=SE701%3Amultiple-dispatch.lisp"/>
	<link rel="alternate" type="text/html" href="https://wiki.kram.nz/index.php?title=SE701:multiple-dispatch.lisp&amp;action=history"/>
	<updated>2026-09-13T16:15:54Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.0</generator>
	<entry>
		<id>https://wiki.kram.nz/index.php?title=SE701:multiple-dispatch.lisp&amp;diff=23&amp;oldid=prev</id>
		<title>Mark: New page:  ;; How CommonLisp multiple dispatch differs from Java&#039;s single dispatch  (defclass a () ())  (defclass sub-a (a) ())    (defclass b () ())  (defclass sub-b (b) ())    (defgeneric foo (a b...</title>
		<link rel="alternate" type="text/html" href="https://wiki.kram.nz/index.php?title=SE701:multiple-dispatch.lisp&amp;diff=23&amp;oldid=prev"/>
		<updated>2008-02-15T19:39:45Z</updated>

		<summary type="html">&lt;p&gt;New page:  ;; How CommonLisp multiple dispatch differs from Java&amp;#039;s single dispatch  (defclass a () ())  (defclass sub-a (a) ())    (defclass b () ())  (defclass sub-b (b) ())    (defgeneric foo (a b...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt; ;; How CommonLisp multiple dispatch differs from Java&amp;#039;s single dispatch&lt;br /&gt;
 (defclass a () ())&lt;br /&gt;
 (defclass sub-a (a) ())&lt;br /&gt;
 &lt;br /&gt;
 (defclass b () ())&lt;br /&gt;
 (defclass sub-b (b) ())&lt;br /&gt;
 &lt;br /&gt;
 (defgeneric foo (a b))&lt;br /&gt;
 &lt;br /&gt;
 (defmethod foo ((x a) (y b))&lt;br /&gt;
   (format nil &amp;quot;foo called on A and B~%&amp;quot;))&lt;br /&gt;
 &lt;br /&gt;
 (defmethod foo ((x sub-a) (y b))&lt;br /&gt;
   (format nil &amp;quot;foo called on SUB-A and B~%&amp;quot;))&lt;br /&gt;
 &lt;br /&gt;
 (defmethod foo ((x a) (y sub-b))&lt;br /&gt;
   (format nil &amp;quot;foo called on A and SUB-B~%&amp;quot;))&lt;br /&gt;
 &lt;br /&gt;
 (defmethod foo ((x sub-a) (y sub-b))&lt;br /&gt;
   (format nil &amp;quot;foo called on SUB-A and SUB-B~%&amp;quot;))&lt;br /&gt;
 &lt;br /&gt;
 (defparameter *just-a* (make-instance &amp;#039;a))&lt;br /&gt;
 (defparameter *just-b* (make-instance &amp;#039;b))&lt;br /&gt;
 (defparameter *sub-a* (make-instance &amp;#039;sub-a))&lt;br /&gt;
 (defparameter *sub-b* (make-instance &amp;#039;sub-b)))&lt;/div&gt;</summary>
		<author><name>Mark</name></author>
	</entry>
</feed>