summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Court`es2007-06-08 15:07:06 +0000
committerLudovic Court`es2007-06-08 15:07:06 +0000
commit044c3a2a038b2295ee42d688dabc29628ff77d7b (patch)
treeed207743fc479f08da357f474471daa6d7649887
parentbd550e03bf7e424fdffa794e7facadc8989ea6cf (diff)
downloadskribilo-044c3a2a038b2295ee42d688dabc29628ff77d7b.tar.gz
skribilo-044c3a2a038b2295ee42d688dabc29628ff77d7b.tar.lz
skribilo-044c3a2a038b2295ee42d688dabc29628ff77d7b.zip
Slight optimization/cleanup of AST traversal functions.
* src/guile/skribilo/ast.scm (container-search-down): Use `(map loop obj)', thereby removing an indirection. (search-down): Likewise. (find-down): Likewise. git-archimport-id: lcourtes@laas.fr--2006-libre/skribilo--devo--1.2--patch-68
-rw-r--r--src/guile/skribilo/ast.scm6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/guile/skribilo/ast.scm b/src/guile/skribilo/ast.scm
index 5484815..1b37a0b 100644
--- a/src/guile/skribilo/ast.scm
+++ b/src/guile/skribilo/ast.scm
@@ -510,7 +510,7 @@
(let loop ((obj (markup-body obj)))
(cond
((pair? obj)
- (concatenate (map (lambda (o) (loop o)) obj)))
+ (concatenate (map loop obj)))
((container? obj)
(let ((rest (loop (markup-body obj))))
(if (pred obj)
@@ -525,7 +525,7 @@
(let loop ((obj (markup-body obj)))
(cond
((pair? obj)
- (concatenate (map (lambda (o) (loop o)) obj)))
+ (concatenate (map loop obj)))
((markup? obj)
(let ((rest (loop (markup-body obj))))
(if (pred obj)
@@ -540,7 +540,7 @@
(let loop ((obj obj))
(cond
((pair? obj)
- (concatenate (map (lambda (o) (loop o)) obj)))
+ (concatenate (map loop obj)))
((markup? obj)
(if (pred obj)
(list (cons obj (loop (markup-body obj))))