From 13e60e195252f15d44f40dad0fb586baafc7be9d Mon Sep 17 00:00:00 2001 From: Timothy Sample Date: Thu, 22 Dec 2022 13:23:57 -0600 Subject: [PATCH] environment: Simplify a 'match' clause for Mes. * gash/environment.scm (get-environ): Simplify the 'match' clause for finding exported variables. --- gash/environment.scm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gash/environment.scm b/gash/environment.scm index 4be796a..3333e9a 100644 --- a/gash/environment.scm +++ b/gash/environment.scm @@ -238,8 +238,10 @@ suitable for passing to @code{environ}. If @var{bindings} is set, consider them as part of the set of current variables." (let ((exported (hash-fold (lambda (name v acc) (match v - (#((? values value) #t _) - (cons `(,name . ,value) acc)) + (#(value #t _) + (if value + (cons `(,name . ,value) acc) + acc)) (_ acc))) '() *variables*)))