• (root loc)
zips all the way up and returns the root node, reflecting any
changes.

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/zip.clj:137 top

(defn root
  "zips all the way up and returns the root node, reflecting any
 changes."
  {:added "1.0"}
  [loc]
    (if (= :end (loc 1))
      (node loc)
      (let [p (up loc)]
        (if p
          (recur p)
          (node loc)))))
Vars in clojure.zip/root:
Used in 0 other vars

Comments top

No comments for root. Log in to add a comment.