Last active
June 2, 2017 14:28
-
-
Save wilkerlucio/bd8725ca007734f46cf14e9b26526644 to your computer and use it in GitHub Desktop.
Specter - walk map keys
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(def data | |
{:person/name "Bla" | |
:person/child {:child/something "other" | |
:child/bla {:subchild/entry "blabla"}}}) | |
(def MapWalker | |
(sp/recursive-path [] p | |
(sp/if-path map? | |
(sp/continue-then-stay sp/MAP-VALS p)))) | |
(sp/setval [MapWalker sp/MAP-KEYS sp/NAMESPACE] nil data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment