#353
Deep key-per
Difficulty: | Easy |
Topics: | Nested map |
Mission: Bikin function untuk update nilai dalam map yang bersarang. Fungsi harus dapat mengakses map bersarang dan mengupdate nilai berdasarkan kunci yang diberikan.
(= (__ {:user {:profile {:name "Clojure"}}} [:user :profile :name] "Clojurer") {:user {:profile {:name "Clojurer"}}}) | |
(= (__ {:a {:b {:c 1}}} [:a :b :c] 2) {:a {:b {:c 2}}}) | |
(= (__ {:info {:age 30 :name "Alice"}} [:info :age] 31) {:info {:age 31 :name "Alice"}}) |