On Tuesday, June 17, 2014 8:16:36 PM UTC+2, Hussein B. wrote:
>
> Oh, this works
>
>  (dosync (alter v #(update-in %1 [1] (fnil conj [ ]) %2) 33))
>

Not sure what %2 or 33 are doing there but you can skip the #() function, 
alter (just like update-in) uses apply internally so you can just use:

(def v (ref {}))

(dosync (alter v update-in [1] (fnil conj []) 22)) 

=> {1 [22]}


-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to