Guest User

Untitled

a guest
Jun 21st, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. (defn clean-up [m]
  2. (reduce f {} m))
  3.  
  4. (defn f
  5. [m [key value]]
  6. (cond
  7. (vector? value) (apply conj m (map clean-up value))
  8. (map? value) (conj m value)
  9. :else (assoc m key value)))
Add Comment
Please, Sign In to add comment