Skip to content

Instantly share code, notes, and snippets.

@bitemyapp
Created July 24, 2013 06:56
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 bitemyapp/6068547 to your computer and use it in GitHub Desktop.
Save bitemyapp/6068547 to your computer and use it in GitHub Desktop.
(defn assoc-in*
"God forgive me."
[m ks v]
(let [k (first ks)]
(if (> (count ks) 0)
(assoc m k (assoc-in* (get m k) (rest ks) v))
(assoc m k v))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment