Hi,

I second Sean's view: dispatching a multimethod on argument count is possible, but maybe not the clearest use of multimethods. I would also prefer the multiple arglist approach.

Am 03.10.2009 um 21:39 schrieb Sean Devlin:

(defn reduce
 ([f coll] (reduce f (first coll) (rest coll)))
 ([f init coll] (reduce stuff...)))

Note, that the first reduce call can also simply be written as (reduce f coll).

Sincerely
Meikel

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to