improve readme example

This commit is contained in:
Nathan Marz 2016-08-05 06:46:29 -04:00
parent 184c14df4c
commit ff2f36ea17

View file

@ -12,7 +12,7 @@ Example 1: Append a sequence of elements to a nested vector
(def data {:a [1 2 3]})
;; Manual Clojure
(update data :a (fn [v] (reduce conj v [4 5])))
(update data :a (fn [v] (into (if v v []) [4 5])))
;; Specter
(setval [:a END] [4 5] data)