Hi fellow Clojurians -
I am stumped with coming up with a definition of a clojure zipper for
json data. Not only would this be useful for json data, but for any
generic hash-map/vector data structure. I don't have a lot of
experience with zippers, but it would be fantastic to provide this
type of enumeration/update/walking functionality. Has anyone
implemented this? I tried to simply get a zipper working for nested
maps but I didn't succeed. My attempt is below:
(defn map-zip [root]
(zip/zipper map?
seq
(fn [node children] (with-meta (hash-map children) (meta
node)))
root))
Thank you for the help! -
Paul
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
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