is there a way to tell specter - don't stop navigation if a path is not met? I have
(def TREE-VALS
(specter/recursive-path [] p
(specter/if-path sequential?
[specter/ALL p]
specter/STAY)))
(defn strip-key-namespace
"Recursively strip out namespaces from keywords."
[m]
;; see <https://github.com/redplanetlabs/specter/wiki/Using-Specter-Recursively>
(specter/setval [TREE-VALS specter/MAP-KEYS specter/NAMESPACE] nil m))
But if the navigator does not find a keyword or a symbol with a namespace it won't go further...
I am thinking of tweaking the recursive navigator there but I want to make sure I am not missing something.ended up with a post walk
(def POST-ORDER-TREE-VALS
(specter/recursive-path [] p
(specter/cond-path
map? (specter/continue-then-stay [specter/MAP-VALS p])
sequential? [specter/ALL p]
set? [specter/ALL p]
specter/STAY)))
(defn strip-key-namespace
"Recursively strip out namespaces from keywords."
[m]
;; see <https://github.com/redplanetlabs/specter/wiki/Using-Specter-Recursively>
(specter/setval [POST-ORDER-TREE-VALS
specter/MAP-KEYS
qualified-keyword?
specter/NAMESPACE] nil m))
seems to work well in the tests