From 86655e4f5439ec543f7010ad9998f69c289371d0 Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Wed, 27 Apr 2011 20:30:47 +0000 Subject: [PATCH] Simplify PARSE-PACKAGE-EXPRESSIONS with FILTER-MAP. --- src/cref/redpkg.scm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/cref/redpkg.scm b/src/cref/redpkg.scm index be0d0e45f..8fd3bbf4d 100644 --- a/src/cref/redpkg.scm +++ b/src/cref/redpkg.scm @@ -241,11 +241,9 @@ USA. os-type)) (define (parse-package-expressions expressions pathname os-type) - (append-map! (lambda (expression) - (let ((pexpr - (parse-package-expression expression pathname os-type))) - (if (not pexpr) '() (list pexpr)))) - expressions)) + (filter-map (lambda (expression) + (parse-package-expression expression pathname os-type)) + expressions)) (define (parse-package-expression expression pathname os-type) (let ((lose -- 2.25.1