I'm trying to update records in a vector, which match certain criteria. Record:
(defrecord Item [id name description]) How can I say e.g. "set name of element to "foo" where id is equal 1"? The vector is mutable (ref). I would do (dosync (commute myVectorRef ???? )) Can't figure the ???? I found e.g. function update-in<http://clojuredocs.org/clojure_core/clojure.core/update-in> But 1. Can't find examples with records, 2. Not sure if I can use it to update a different field than the one I'm using to do the query. In the examples fields seem to be the same. The complete use case: I have a webservice which update operation, where I get a map with the id of the item and optional fields which have to be updated. -- 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.