Fork me on GitHub
#specter
<
2017-09-19
>
nathanmarz23:09:08

@michaelwfogleman the zipper data structure is an implementation detail, I don't think showing those belongs in the documentation

nathanmarz23:09:18

with zipper usage you always do the following steps: 1. navigate to zipper, 2. navigate with zippers to whatever you want to change 3. navigate using NODE or NODE-SEQ to the actual value for updates

nathanmarz23:09:31

e.g. (transform [VECTOR-ZIP DOWN RIGHT RIGHT NODE] inc [1 2 3 4 5]) ; => [1 2 4 4 5]

nathanmarz23:09:07

also here's an example of NODE-SEQ for you:

(setval [VECTOR-ZIP DOWN RIGHT RIGHT NODE-SEQ] [:a :b :c] [1 2 3 4 5])
;; => [1 2 :a :b :c 4 5]