How to dispatch on specific argument(s) of a function?
example:
(defmulti group ????)
(defmethod group ??? [xs n]
(loop [acc nil
x xs]
(if (not x)
(reverse acc)
(recur (cons (take n x) acc) (drop n x)))))
Here I want to dispatch on the class of the first argument xs.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---