Skip to content

Commit

Permalink
libraries/history-tree: Fix map-owned-tree.
Browse files Browse the repository at this point in the history
When given a tree, map-tree starts from the root, but if the root is not owned,
then map-owned-tree would stop immediately.

Instead, we must started from the owned-root, thus guaranteeing that all owned
children are traversed.
  • Loading branch information
Ambrevar committed Sep 16, 2021
1 parent 2242ecd commit 3a3075b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions libraries/history-tree/history-tree.lisp
Expand Up @@ -628,8 +628,10 @@ current node result to the result of further traversal."
(export-always 'map-owned-tree)
(defun map-owned-tree (function tree owner &key flatten include-root
(collect-function #'cons))
"Like `map-tree' but restrict traversal to OWNER's nodes."
(map-tree function tree
"Like `map-tree' but restrict traversal to OWNER's nodes.
TREE is unused."
(declare (ignore tree))
(map-tree function (owned-root owner)
:owner owner
:flatten flatten
:include-root include-root
Expand Down

0 comments on commit 3a3075b

Please sign in to comment.