1.3.0 permalink Arrow_down_16x16

rightmost

clojure.zip

  • (rightmost loc)
Returns the loc of the rightmost sibling of the node at this loc, or self

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:157 top

(defn rightmost
  "Returns the loc of the rightmost sibling of the node at this loc, or self"
  {:added "1.0"}
  [loc]
    (let [[node {l :l r :r :as path}] loc]
      (if (and path r)
        (with-meta [(last r) (assoc path :l (apply conj l node (butlast r)) :r nil)] (meta loc))
        loc)))
Vars in clojure.zip/rightmost:
Used in 0 other vars

Comments top

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