(matchwalk zloc matchers f)
match every entry within a form
(-> (matchwalk (z/of-string "(+ (+ (+ 8 9)))") [(match/compile-matcher '+)] (fn [z] (-> z z/down (z/replace '-) z/up))) z/sexpr) => '(- (- (- 8 9)))
match every entry within a form (-> (matchwalk (z/of-string "(+ (+ (+ 8 9)))") [(match/compile-matcher '+)] (fn [z] (-> z z/down (z/replace '-) z/up))) z/sexpr) => '(- (- (- 8 9)))
(matchwalk-base zloc [m & more :as matchers] f recur-fn)
base helper function for matchwalk
base helper function for matchwalk
(topwalk zloc [matcher] f)
only match the form at the top level (-> (topwalk (z/of-string "(+ (+ (+ 8 9)))") [(match/compile-matcher '+) (match/compile-matcher '+)] (fn [z] (-> z z/down (z/replace '-) z/up))) z/sexpr) => '(- (+ (+ 8 9)))
only match the form at the top level (-> (topwalk (z/of-string "(+ (+ (+ 8 9)))") [(match/compile-matcher '+) (match/compile-matcher '+)] (fn [z] (-> z z/down (z/replace '-) z/up))) z/sexpr) => '(- (+ (+ 8 9)))
(topwalk-base zloc [matcher] f recur-fn)
base helper function for topwalk
base helper function for topwalk
(wrap-meta walk-fn)
allows matchwalk to handle meta tags
allows matchwalk to handle meta tags
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close