   (-remove-method [mf dispatch-val])
   (-prefer-method [mf dispatch-val dispatch-val-y])
   (-get-method [mf dispatch-val])
-  (-invoke [mf arg1]))
+  (-methods [mf])
+  (-prefers [mf])
+
+  (-invoke [mf args])
+)
+
+;;-invoke [mf arg1 argseq]
+(defn- do-invoke
+  [mf dispatch-fn & args]
+  (let [fargs (flatten args)
+	dispatch-val (apply dispatch-fn fargs)
+	target-fn (-get-method mf dispatch-val)]
+    (when-not target-fn
+      (throw (str "No method in multimethod '" name "' for dispatch value: " dispatch-val)))
+    (apply target-fn fargs)))
 
 (deftype MultiFn [name dispatch-fn default-dispatch-val hierarchy
     		  method-table prefer-table method-cache cached-hierarchy]

      (throw (str "Preference conflict in multimethod '" name "': " dispatch-val-y " is already preferred to " dispatch-val-x)))
    (swap! prefer-table assoc dispatch-val-y (conj (get @prefer-table dispatch-val-x #{}) dispatch-val-y))
    (reset-cache method-cache method-table cached-hierarchy hierarchy))
  
  (-invoke [mf arg1]
    (let [dispatch-val (dispatch-fn arg1)
	  target-fn (-get-method mf dispatch-val)]
      (when-not target-fn
      	(throw (str "No method in multimethod '" name "' for dispatch value: " dispatch-val)))
      (prn target-fn arg1)
      (target-fn arg1)
      ))
  )



		(partition 2 deriv-seq))
	h))))

(defn- reset-cache
  [method-cache method-table cached-hierarchy hierarchy]
  (swap! method-cache (fn [_] (deref method-table)))
