GNU bug report logs -
#59747
[PATCH] services: configuration: rework alist? procedure
Previous Next
Reported by: mirai <at> makinata.eu
Date: Thu, 1 Dec 2022 18:11:02 UTC
Severity: normal
Tags: patch
Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
From: Bruno Victal <mirai <at> makinata.eu>
* gnu/services/configuration.scm: rework alist? procedure
---
gnu/services/configuration.scm | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/gnu/services/configuration.scm b/gnu/services/configuration.scm
index dacfc52ba9..5bbb032c66 100644
--- a/gnu/services/configuration.scm
+++ b/gnu/services/configuration.scm
@@ -436,7 +436,11 @@ (define (list-of pred?)
(define list-of-strings?
(list-of string?))
-(define alist? list?)
+(define alist?
+ (match-lambda
+ (() #t)
+ ((and (= car head) (= cdr tail)) (and (pair? head) (alist? tail)))
+ (_ #f)))
(define serialize-file-like empty-serializer)
base-commit: 748ec628826cea3faa3679074d87fae9bc810080
--
2.38.1
This bug report was last modified 2 years and 154 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.