Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
(defn get-instance [m k]
(if (contains? @m k) (get @m k)
(if-let [v (get m k)] v
(let [newV (create-some-instance)]
(alter m assoc k newV)
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.