You're viewing version 1.2.0 of postwalk-replace. The latest stable version of Clojure Core is 1.3.0.
1.2.0 Arrow_down_16x16

postwalk-replace

clojure.walk

  • (postwalk-replace smap form)
Recursively transforms form by replacing keys in smap with their
values. Like clojure/replace but works on any data structure. Does
replacement at the leaves of the tree first.

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/walk.clj:119 top

(defn postwalk-replace
  "Recursively transforms form by replacing keys in smap with their
  values.  Like clojure/replace but works on any data structure.  Does
  replacement at the leaves of the tree first."
  {:added "1.1"}
  [smap form]
  (postwalk (fn [x] (if (contains? smap x) (smap x) x)) form))
Vars in clojure.walk/postwalk-replace: contains? defn fn
Used in 0 other vars

Comments top

No comments for postwalk-replace. Log in to add a comment.