Created
November 22, 2015 01:17
-
-
Save brianfay/953e4eceff10a93845ca to your computer and use it in GitHub Desktop.
my-update-in
This file contains hidden or 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 my-update-in | |
[m [k & ks] v] | |
(if (empty? ks) | |
(update m k v) | |
(assoc m k (my-update-in (k m) ks v)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment