Answer by Markc for Update multiple elements of a Clojure atom
Another option, if you're doing a lot of nested structure manipulation, is to use https://github.com/nathanmarz/specter, in this case the "transform" operation.(ns specterplay.core (:require...
View ArticleAnswer by Michiel Borkent for Update multiple elements of a Clojure atom
The way to go about this is:(def data (atom [{:orderid 0 :productid 0 :description "A" :amount 2} {:orderid 1 :productid 1 :description "A" :amount 2}]))(defn edit-order [params] (swap! data (fn...
View ArticleUpdate multiple elements of a Clojure atom
I have a atom: (def data (atom[ {:orderid 0 :productid 0 :description "A" :amount 2} {:orderid 1 :productid 1 :description "A" :amount 2}]))and my swap function: (defn edit-order [params] (filter #(and...
View Article
More Pages to Explore .....