1
0
forked from alex-eg/sex

maybe rewrite map-filter-tree with tree.scm's tree inversions?

They don't seem intuitive, need to mess around a bit to understand
them.
This commit is contained in:
alex-eg
2025-05-30 12:37:28 +03:00
parent 24bcd93a36
commit c4dd5786a8

View File

@@ -4,6 +4,7 @@
(string->symbol (string->symbol
(string-translate (symbol->string sym) #\- #\_))) (string-translate (symbol->string sym) #\- #\_)))
; Maybe rewrite with tree inversions?
(define (map-filter-tree map-proc filter-proc tree) (define (map-filter-tree map-proc filter-proc tree)
"Walk the tree, checking each element with filter-proc. "Walk the tree, checking each element with filter-proc.
If filter-proc returns #t: If filter-proc returns #t: