environment: Simplify a 'match' clause for Mes.

* gash/environment.scm (get-environ): Simplify the 'match' clause
for finding exported variables.
This commit is contained in:
Timothy Sample 2022-12-22 13:23:57 -06:00
parent 9b53a6b25b
commit 13e60e1952
1 changed files with 4 additions and 2 deletions

View File

@ -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*)))