Skip to content

Commit c161e70

Browse files
committed
Avoid needless consing.
1 parent ee69be8 commit c161e70

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/stp.lisp

+3-5
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,9 @@
3737
node))
3838
elt)
3939
(let ((matches '()))
40-
(stp:filter-recursively
41-
(lambda (node)
42-
(when (and (element-p node) (funcall matcher node))
43-
(push node matches)))
44-
elt)
40+
(stp:do-recursively (node elt)
41+
(when (and (element-p node) (funcall matcher node))
42+
(push node matches)))
4543
(nreverse matches))))
4644

4745
(defmethod %do-query (matcher (elt stp:element) &key (first? nil))

0 commit comments

Comments
 (0)