> > One thing I immediately ran up against were certain situations where
> > I have a map and want to "modify" a value several levels deep into
> > the hierarchy. Imagine the following structure:
>
> > (def nested-structure { :level 0,
> > :nested1 { :level 1,
> > :nested2 { :level 2,
> > :final-data "initial data"}}})
>
> Look into clojure.zip (.../src/clj/clojure/zip.clj in the Clojure
> source).
>
Excellent... thanks for the pointer. I will take a stab at using this
for maps (I see stuff for vector-zip, but not yet maps).
As an off-hand comment made without careful reading, I can imagine
there being great utility in a special reader-syntax for paths. XSLT
embeds xpath, and groovy embeds gpath. I am unsure at this point the
exact capabilities of the zipper, so I don't know whether it's meant
to go to a single location in a tree (it seems this way) or whether it
refers to a sequence of all tree nodes that satisfy the predicates of
the path (as xpath and gpath do). For the latter scenario, though, a
reader syntax for a "path" could be very useful.
thanks again !
daniel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---