Skip to content

Commit

Permalink
Minor
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinmera committed Jan 1, 2024
1 parent a93f491 commit 3abc4e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions protocol.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@
(declare (dynamic-extent #'consider))
(call-with-overlapping #'consider container region))))

(defun describe-tree (node children-fun stream &key (max-depth (or *print-level* 3)))
(defun describe-tree (node children-fun stream &key (max-depth (or *print-level* 3)) (key #'identity))
(fresh-line stream)
(labels ((recurse (node last depth)
(when last
Expand All @@ -538,7 +538,7 @@
(format stream "~:[~; ~]" p))
(format stream "~:[~;~]" cur)))
(cond ((< depth max-depth)
(format stream " ~a~%" node)
(format stream " ~a~%" (funcall key node))
(let ((children (funcall children-fun node)))
(when (typep children 'sequence)
(loop with max = (1- (length children))
Expand Down

0 comments on commit 3abc4e8

Please sign in to comment.