Hi all,

I'm playing around with defprotocol and defrecord and I ran into a
problem when trying to provide my own seq method. I try to create a
record like so:
(defrecord Foo [bar]
  clojure.lang.Seqable
  (seq [this] (seq this)))

but I get an error:
error: java.lang.ClassFormatError: Duplicate method name&signature in
class file...

I presume this is due to the seq method already being defined by
defrecord. If I use deftype it will work, but then I lose all the
goodness of being able to use my type as a map. Is there a way to use
defrecord but override seq with my own implementation?

Thanks,

Kees

-- 
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