Sean, it sounds like you want (swap! some-a update-in [:k1 :k2] (fnil conj []) id)
But that's based on some pretty limited context. On Friday, August 16, 2013, Sean Corfield wrote: > On Fri, Aug 16, 2013 at 4:32 PM, Timothy Baldridge > <tbaldri...@gmail.com<javascript:;>> > wrote: > > I'm just going to throw this out there, but I almost always consider > using > > #() instead of (fn []) to be bad practice. > > I still use #() for anonymous single argument functions that are > small, single forms, but I've started switching to (fn [..] ..) for > anything even slightly more complex because, like you, I find having a > named argument to be worth the extra typing, even if it is just a > single letter, suggestive of the argument type. > > Today I found myself writing (fnil #(conj % id) []) a couple of times > because (fnil (fn [v] (conj v id)) []) doesn't seem any clearer - but > suggestions for nicer code are always welcome. It's part of (swap! > some-atom update-in [:path :to :item] ...) if that helps :) > > Sean > > -- > -- > 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<javascript:;> > 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 <javascript:;> > 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 <javascript:;>. > For more options, visit https://groups.google.com/groups/opt_out. > -- -- 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/groups/opt_out.