On Wed, Dec 9, 2009 at 5:24 PM, CuppoJava <patrickli_2...@hotmail.com> wrote:
> I've run into this problem before also actually. Basically from what I
> read, self-recursive data-structures are hard to do in an eager
> functional programming language. I think you have to resort to
> mutation to handle it nicely. But I would be very happy to be proven
> wrong.
>  -Patrick

PLT Scheme has a construct called "shared" that makes it easy to
construct self-recursive data structures without mutation.  It's sort
of like a "letrec" for data:
http://docs.plt-scheme.org/reference/shared.html

So it's definitely possible to make it easy to write self-recursive
data structures in an eager functional programming language without
mutation, but I'm not aware of a way to do it in Clojure.

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