Skip to content

Instantly share code, notes, and snippets.

@pbaille
Created February 16, 2017 07:35
Show Gist options
  • Select an option

  • Save pbaille/ddb18770a1c515a0e8d06eeff959e5c9 to your computer and use it in GitHub Desktop.

Select an option

Save pbaille/ddb18770a1c515a0e8d06eeff959e5c9 to your computer and use it in GitHub Desktop.
(letfn [(merge-in* [a b]
(if (map? a)
(merge-with merge-in* a b)
b))]
(defn merge-in
"Merge multiple nested maps."
[& args]
(reduce merge-in* nil args)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment