From: Taylor R Campbell Date: Wed, 27 Apr 2011 20:30:47 +0000 (+0000) Subject: Simplify PARSE-PACKAGE-EXPRESSIONS with FILTER-MAP. X-Git-Tag: 20110609-Gtk~16^2~10 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=86655e4f5439ec543f7010ad9998f69c289371d0;p=mit-scheme.git Simplify PARSE-PACKAGE-EXPRESSIONS with FILTER-MAP. --- 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