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.
(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))))))
Comments top
No comments for ancestors. Log in to add a comment.