Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
(defn ?assoc-transform
"(?assoc-transform {:a 1} :a 2 sequential? vector) => {:a [1 2]}"
[m k v test transform]
(let [val (m k)]
(if-let [okay (test val)]
(assoc m k v)
(assoc m k (transform val v)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.