鉴于以下情况:
(defrecord Person [firstname lastname])
(def some-map (ref {}))
(dosync
(alter some-map conj {1 (Person. "john" "doe")})
(alter some-map conj {2 (Person. "jane" "jameson")}))
要将“joe”的名字更改为“nick”,我执行以下操作:
(dosync
(alter some-map (fn [m]
(assoc m 1
(assoc (m 1) :firstname "nick")))))
在 Clojure 中这样做的惯用方式是什么?