Not a guru here (far from!), but don't get too thrown off by what the
word 'immutable' means in your head. In Clojure 'immutable' refers
more to how things work in the belly of the beast..

Clojure has 4 constructs (vars, refs, agents and atoms) to faciliate
mutating things. Probably the best thing to do is to read up on them,
or watch one of the webcasts in which it is explained

On Feb 12, 9:32 am, timc <timgcl...@gmail.com> wrote:
> I'm new to Clojure so this may be a stupid question.
>
> I want to make a tree out of these things:
>
> (defstruct treeNode :parent :children :data)
>
> so that every node knows which node is its parent and which nodes are
> its children.
>
> But, given that these things are immutable, I am baffled as to how the
> tree may be constructed - in particular how it's possible to make
> immutable things that 'point at' each other.
>
> Any guidance on this would be greatly appreciated.
--~--~---------~--~----~------------~-------~--~----~
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
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