Re: Multimethod question

2009-01-20 Thread Konrad Hinsen
On Jan 20, 2009, at 17:49, Christophe Grand wrote: > user=> (ancestors clojure.lang.IPersistentVector) > #{clojure.lang.Sequential clojure.lang.Associative > clojure.lang.IPersistentCollection clojure.lang.Reversible > clojure.lang.IPersistentStack} > > Hence clojure.lang.IPersistentVector clearl

Re: Multimethod question

2009-01-20 Thread Christophe Grand
Hi Konrad! Konrad Hinsen a écrit : > Given the definitions: > > (defmulti foo class) > (defmethod foo clojure.lang.IPersistentCollection [_] :a-collection) > (defmethod foo clojure.lang.IPersistentVector [_] :a-vector) > > one obtains the following results: > > (foo [1 2 3]) -> :a-vector > (foo