1.2.0 permalink Arrow_down_16x16
  • (ancestors loc)
Returns a lazy sequence of all ancestors of location loc, starting
with loc and proceeding to loc's parent node and on through to the
root of the tree.

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/contrib/zip_filter.clj:65 top

(defn ancestors
  "Returns a lazy sequence of all ancestors of location loc, starting
  with loc and proceeding to loc's parent node and on through to the
  root of the tree."
  [loc] (lazy-seq (when loc (cons (auto false loc) (ancestors (zip/up loc))))))
Vars in clojure.contrib.zip-filter/ancestors: ancestors cons defn lazy-seq when
Used in 0 other vars

Comments top

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