Simplify PARSE-PACKAGE-EXPRESSIONS with FILTER-MAP.
authorTaylor R Campbell <campbell@mumble.net>
Wed, 27 Apr 2011 20:30:47 +0000 (20:30 +0000)
committerTaylor R Campbell <campbell@mumble.net>
Wed, 27 Apr 2011 20:30:47 +0000 (20:30 +0000)
src/cref/redpkg.scm

index be0d0e45f0247a8f844a9d0029bb70b72de675b1..8fd3bbf4d0a0da6e7019c058a97db3482673937c 100644 (file)
@@ -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