【发布时间】:2016-02-19 07:29:47
【问题描述】:
我有这张地图
(def m {:a "aaa" :b {:c ["ss" "gg"]}})
我想将它更新为这个(将“uu”添加到向量中:c):
{:a "aaa" :b {:c ["ss" "gg" "uu"]}}
这是我想出的,我讨厌它:
(assoc-in m [:b :c] (conj (get-in m [:b :c]) "uu"))
应该我该怎么做?
【问题讨论】:
标签: dictionary vector clojure