Using swap to MERGE (append to) a nested map in a Clojure atom? -


let's have atom contains map this:

{:count 0 :map hash-map} 

how can use swap merge key-value pair onto :map?

you'd use assoc-in:

(swap! my-atom assoc-in [:map :new-key] value) 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -