A zipper navigation function moves the focused location through a tree without prescribing a full traversal. Create a zipper with `zip/vector-zip`, `zip/seq-zip`, or `zip/xml-zip`; then use `zip/down`, `zip/up`, `zip/right`, or `zip/left` to move one step. section 8.4.4
Navigate a vector zipper
(def z (zip/vector-zip [[1 2] [3 4]])) (-> z zip/down zip/right zip/node) ;; [3 4] (-> z zip/down zip/down zip/down) ;; nil Navigation returns a location; `zip/node` retrieves its focused value. Moving down past a leaf returns `nil`. section 8.4.4
Use `zip/rightmost` or `zip/leftmost` to jump to an extreme sibling. For a built-in depth-first traversal instead, use `zip/next` or `zip/prev`. section 8.4.4
(pprint vzip)
;; [[[1 2] [3 4 [5 10 [11 12]]] [13 14]] ; #1
;; nil]
(pprint (zip/down vzip))
;; [[1 2] ; #2
;; {:l [],
;; :pnodes [[[1 2] [3 4 [5 10 [11 12]]] [13 14]]],
;; :ppath nil,
;; :r ([3 4 [5 10 [11 12]]] [13 14])}]
(pprint (zip/rightmost (zip/down vzip)))
;; [[13 14] ; #3
;; {:l [[1 2] [3 4 [5 10 [11 12]]]],
;; :pnodes [[[1 2] [3 4 [5 10 [11 12]]] [13 14]]],
;; :ppath nil,
;; :r nil}]
Inspect how `zip/down` and `zip/rightmost` change the focused node and record its parent and siblings in the location. section 8.4.4
