Created
September 20, 2013 20:51
-
-
Save bitemyapp/6643736 to your computer and use it in GitHub Desktop.
This file contains 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 vectorish [left right] | |
(if (sequential? left) | |
(conj left right) | |
(vector left right))) | |
(defn ?assoc-transform | |
"(?assoc-transform {:a 1} :a 2 sequential? vector) => {:a [1 2]}" | |
[m k v transform] | |
(assoc m k (transform (m k) v))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment