aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Court`es2007-06-08 15:08:50 +0000
committerLudovic Court`es2007-06-08 15:08:50 +0000
commit20455d41e79be6faa36c22d1ddb7fbddf77ae4d3 (patch)
tree8633a1493c651b0446d17735c03a63f50fb12b8c
parent9704d8c6a98aeb2d553438b546956eb0bb1696b2 (diff)
parent044c3a2a038b2295ee42d688dabc29628ff77d7b (diff)
downloadskribilo-20455d41e79be6faa36c22d1ddb7fbddf77ae4d3.tar.gz
skribilo-20455d41e79be6faa36c22d1ddb7fbddf77ae4d3.tar.lz
skribilo-20455d41e79be6faa36c22d1ddb7fbddf77ae4d3.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: skribilo@sv.gnu.org--2006/skribilo--devo--1.2--patch-109
-rw-r--r--ChangeLog19
-rw-r--r--src/guile/skribilo/ast.scm6
2 files changed, 22 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index cd79228..af87905 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,25 @@
# arch-tag: automatic-ChangeLog--skribilo@sv.gnu.org--2006/skribilo--devo--1.2
#
+2007-06-08 15:08:50 GMT Ludovic Court`es <ludovic.courtes@laas.fr> patch-109
+
+ Summary:
+ Slight optimization/cleanup of AST traversal functions.
+ Revision:
+ skribilo--devo--1.2--patch-109
+
+ * src/guile/skribilo/ast.scm (container-search-down): Use `(map loop
+ obj)', thereby removing an indirection.
+ (search-down): Likewise.
+ (find-down): Likewise.
+
+ modified files:
+ ChangeLog src/guile/skribilo/ast.scm
+
+ new patches:
+ lcourtes@laas.fr--2006-libre/skribilo--devo--1.2--patch-68
+
+
2007-06-07 14:34:59 GMT Ludovic Court`es <ludovic.courtes@laas.fr> patch-108
Summary:
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))))