2010/7/30 Nicolas Oury <nicolas.o...@gmail.com>

> Dear all,
>
> I am using deftype to write a pure data structure.
> It would be neat to make it Seqable.
>

If you want to make it seqable, it seems sufficient to implement
clojure.lang.Seqable, which has the method seq().

Having then your type directly support the ISeq interface or wrapping your
type in e.g. (lazy-seq) calls becomes then an implementation detail ?


>
> I looked a bit around on how to make that and did not manage to figure it
> out.
> I can implement ISeq but it does not seem to be enough.
> There seems to be an ASeq that my data structure should inherit from,
> but I cannot do that with deftype.
>
> Is there a way to do a new type of Seq today or I should wait that
> clojure-in-clojure advances a bit more to try that?
> Or should I not try to implement anything directly and use lazy-seq?
>
>
> Best regards,
>
> Nicolas.
>
> --
> 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<clojure%2bunsubscr...@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