Liking cljdoc? Tell your friends :D

code.query.walk


levelwalkclj

(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)))
raw docstring

matchwalkclj

(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)))
raw docstring

wrap-metaclj

(wrap-meta walk-fn)

allows matchwalk to handle meta tags

allows matchwalk to handle meta tags
raw docstring

wrap-suppressclj

(wrap-suppress walk-fn)

allows matchwalk to handle exceptions

allows matchwalk to handle exceptions
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close