次のようなマップのベクトルを持つ試薬原子があるとします。
(def my-atom (reagent/atom [{:id 1 :name "first name"}
{:id 2 :name "second name"}]))
特定のベクトル インデックスのキーの値を次のように更新するにはどうすればよいですか。
[{:id 1 :name "first name"}
{:id 2 :name "UPDATED second name"}]
次のような関数を探しています(update-my-atom 1 :name "UPDATED second name")
:
(defn update-my-atom
[vector-index key new-value]
(swap! ??? - ???)