Re: Key must be integer error

2018-04-29 Thread Tim Visher
Hi Renata, ``` user=> (clojure.pprint/pprint (swap! accounts #(map (fn [a] (if (= (:id a) "3136860d-ab7f-4814-8f3b-2d18048db9b9") (assoc a :operations :foo) a)) %))) ({:id "7512a15b-0770-4a9b-a74b-389374b46461", :balance 0.0, :operations nil, :blocked false} {:id "7446cfe6-882c-4f25-bad1-5e

Re: Key must be integer error

2018-04-29 Thread Axel Katerbau
Hi Renata, > How can I update the atom accounts in the field of operations? > > (def accounts (atom [{:id "7512a15b-0770-4a9b-a74b-389374b46461", :balance > 0.0, :operations nil, :blocked false} > {:id "7446cfe6-882c-4f25-bad1-5ed8c9aea994", :balance 0.0, :operations nil, > :blocked false}

Key must be integer error

2018-04-29 Thread Renata Soares
Hi, How can I update the atom accounts in the field of operations? (def accounts (atom [{:id "7512a15b-0770-4a9b-a74b-389374b46461", :balance 0.0, :operations nil, :blocked false} {:id "7446cfe6-882c-4f25-bad1-5ed8c9aea994", :balance 0.0, :operations nil, :blocked false} {:id "3136860d-ab