Liking cljdoc? Tell your friends :D

lucid.query.walk


matchwalkclj

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

matchwalk-baseclj

(matchwalk-base zloc [m & more :as matchers] f recur-fn)

base helper function for matchwalk

base helper function for matchwalk
raw docstring

topwalkclj

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

topwalk-baseclj

(topwalk-base zloc [matcher] f recur-fn)

base helper function for topwalk

base helper function for topwalk
raw docstring

wrap-metaclj

(wrap-meta walk-fn)

allows matchwalk to handle meta tags

allows matchwalk to handle meta tags
raw docstring

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

× close