I think you simply need to get the syntax right. The following works
fine for me:

user=>  (defprotocol p (foo [this]))
p
user=>  (deftype a [f] p (foo []))
#'user/a
user=> (foo (a nil))
nil
user=> (deftype a [f] :as this p (foo [] [this]))
#'user/a
user=> (foo (a nil))
[#:a{:f nil}]




On Mon, Jan 4, 2010 at 6:37 AM, Raoul Duke <rao...@gmail.com> wrote:
> hi,
>
> i've only heard crickets so far, am i really the only one who can't
> get this to work? help? :-} thanks. i figure i must be doing something
> dirt simple wrong?
>
> Clojure 1.1.0-new-SNAPSHOT
> user=> (defprotocol p (foo [this]))
> p
> user=> (deftype a [f] [p] (.foo [this]))
> java.lang.RuntimeException: java.lang.ClassCastException:
> clojure.lang.PersistentVector cannot be cast to clojure.lang.Symbol
> (NO_SOURCE_FILE:0)
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to