p.s. extend seems to work
(extend ::T P {:foo (fn [x] (println x))})
(foo (T))
On Tue, Dec 29, 2009 at 12:08 PM, Raoul Duke <[email protected]> wrote:
> i haven't been able to figure out what i'm doing wrong yet. the error
> message isn't super helpful :-}
>
> Clojure 1.1.0-alpha-SNAPSHOT
> user=> (defprotocol P (foo [x]))
> P
> user=> (deftype T [f] [P] (foo [x] x))
> java.lang.ClassCastException: clojure.lang.Var cannot be cast to
> java.lang.Class (NO_SOURCE_FILE:2)
>
> ?! thanks for any help.
>
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
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