if i have a list node (1 2 3 4 5) and i've called (-> zloc z/down z/right z/right), i'm at 3. how do i take 3, 4, and 5 as a sequence?
Hi @nbtheduke! Here's one way:
(require '[rewrite-clj.zip :as z])
(def zloc (z/of-string "(1 2 3 4 5)"))
(some->> zloc
z/down
z/right
z/right
(iterate z/right)
(take-while identity)
(map z/node))
;; => ({:value 3, :string-value "3"}
;; {:value 4, :string-value "4"}
;; {:value 5, :string-value "5"})
Does that work for you?That’s great, thank you
Always a pleasure @nbtheduke!