title: "Overloading" CLOS multimethods With Different Parameter Lists
body: <p>I am trying to do an "overload call" of a multimethod in Common Lisp. Here is a simplified rundown of the case:</p>
  
  <pre><code>(defclass foo ()
    ((slotty :accessor slotty :initarg :slotty)))
  
  (defclass bar ()
    ((slotty :accessor slotty :initarg :slotty)))
  
  (defparameter *foo* (make-instance 'foo :slotty "defnoodle"))
  (defparameter *bar* (make-instance 'bar :slotty "Chocolate"))
  
  (defmethod contrived ((f foo) (b bar))
    (format t "i pity the foo ~A, who has a bar ~A ~%" (slotty f) (slotty b)))
  
  (contrived *foo* *bar*)
  </code></pre>
  
  <p>outputs: <code>i pity the foo defnoodle, who has a bar Chocolate</code></p>
  
  <p>But as soon as I try to define the next method:</p>
  
  <pre><code> (defmethod contrived ((f foo))
      (format  t "i just pity the foo ~A ~%" (slotty f)))
  </code></pre>
  
  <p>CL gets mad:</p>
  
  <pre><code>; The generic function #&lt;STANDARD-GENERIC-FUNCTION CONTRIVED (1)&gt;
  ; takes 2 required arguments; was asked to find a method with
  ; specializers (#&lt;STANDARD-CLASS FOO&gt;)
  ;   [Condition of type SB-PCL::FIND-METHOD-LENGTH-MISMATCH]
  ; See also:
  ;  Common Lisp Hyperspec, FIND-METHOD [:function]
  </code></pre>
  
  <p>Does anyone know what I am doing wrong here? I know that initialize-instance has a similar kind of flexibility since one should be able to identify n number of initialize-instance methods per class and per any number of arguments.</p>
  
  <pre><code>(defmethod initialize-instance :after ((f foo) &amp;key)
    ())
  </code></pre>
  
  <p>but it is not clear to me how I can translate this to the vanilla example I gave above. And I feel like I could be barking up the wrong tree since this is part of MOP. </p>