Returns a query predicate that matches a node when its is a tag
named tagname.
(defn tag=
"Returns a query predicate that matches a node when its is a tag
named tagname."
[tagname]
(fn [loc]
(filter #(and (zip/branch? %) (= tagname ((zip/node %) :tag)))
(if (zf/auto? loc)
(zf/children-auto loc)
(list (zf/auto true loc))))))
Comments top
No comments for tag=. Log in to add a comment.