Skip to content

Instantly share code, notes, and snippets.

@rdsr
Created November 11, 2010 13:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rdsr/672488 to your computer and use it in GitHub Desktop.
Save rdsr/672488 to your computer and use it in GitHub Desktop.
(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