Created
November 11, 2010 13:19
-
-
Save rdsr/672488 to your computer and use it in GitHub Desktop.
This file contains 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
(defn clean-up [m] | |
(reduce f {} m)) | |
(defn f | |
[m [key value]] | |
(cond | |
(vector? value) (apply conj m (map clean-up value)) | |
(map? value) (conj m value) | |
:else (assoc m key value))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment