;; Useful to perform operations on locations without knowing the
;; internals of the zipper. For example, here's a generic remove-child to remove
;; the first children from a node
(require '[clojure.zip :as zip])
(def vzip
(zip/vector-zip
[[1 2]
[3 4 [5 10 [11 12]]]
[13 14]]))
(defn remove-child [loc]
(zip/replace loc
(zip/make-node loc (zip/node loc) (rest (zip/children loc)))))
(-> vzip zip/down zip/rightmost remove-child zip/root)
;; [[1 2] [3 4 [5 10 [11 12]]] [14]]