(levelwalk nav [matcher] f)
(levelwalk nav [matcher] f {:keys [debug] :as opts})
only match the form at the top level (-> (levelwalk (nav/parse-string "(+ (+ (+ 8 9)))") [(match/compile-matcher '+) (match/compile-matcher '+)] (fn [nav] (-> nav nav/down (nav/replace '-) nav/up))) nav/value) => '(- (+ (+ 8 9)))
only match the form at the top level (-> (levelwalk (nav/parse-string "(+ (+ (+ 8 9)))") [(match/compile-matcher '+) (match/compile-matcher '+)] (fn [nav] (-> nav nav/down (nav/replace '-) nav/up))) nav/value) => '(- (+ (+ 8 9)))
(matchwalk nav matchers f)
(matchwalk nav matchers f {:keys [suppress] :as opts})
match every entry within a form
(-> (matchwalk (nav/parse-string "(+ (+ (+ 8 9)))") [(match/compile-matcher '+)] (fn [nav] (-> nav nav/down (nav/replace '-) nav/up))) nav/value) => '(- (- (- 8 9)))
match every entry within a form (-> (matchwalk (nav/parse-string "(+ (+ (+ 8 9)))") [(match/compile-matcher '+)] (fn [nav] (-> nav nav/down (nav/replace '-) nav/up))) nav/value) => '(- (- (- 8 9)))
(wrap-meta walk-fn)
allows matchwalk to handle meta tags
allows matchwalk to handle meta tags
(wrap-suppress walk-fn)
allows matchwalk to handle exceptions
allows matchwalk to handle exceptions
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close