Clojure Zippers¶
Usually tress are of the forms of maps and vectors
(defn map-zipper [m]
(zip/zipper
(fn [x] (or (map? x) #_(vector? x))
(fn [x] (:children x))
(fn [x children]
(assoc x :children children)) m))
Links¶
- https://clojuredocs.org/clojure.zip
- https://lambdaisland.com/blog/2018-11-26-art-tree-shaping-clojure-zip
- http://josf.info/blog/2014/03/21/getting-acquainted-with-clojure-zippers/
- http://josf.info/blog/2014/03/28/clojure-zippers-structure-editing-with-your-mind/
- http://josf.info/blog/2014/04/14/seqs-of-clojure-zippers/