summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Victal <mirai@makinata.eu>2022-12-01 18:09:47 +0000
committerLudovic Courtès <ludo@gnu.org>2022-12-08 13:07:46 +0100
commit9336baf258d6fc19e5dfa5bcfc7892d239f24837 (patch)
tree664d3b95f22a928ea6033d8738de775f25925d18
parentcc6b88d00d8ba696ca49846d60c415f7668f9d62 (diff)
services: configuration: Rewrite 'alist?' procedure.
* gnu/services/configuration.scm (alist?): Rewrite. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
-rw-r--r--gnu/services/configuration.scm6
1 files changed, 5 insertions, 1 deletions
diff --git a/gnu/services/configuration.scm b/gnu/services/configuration.scm
index 2b3bd4c1f4..10cb933ed1 100644
--- a/gnu/services/configuration.scm
+++ b/gnu/services/configuration.scm
@@ -436,7 +436,11 @@ the list result in @code{#t} when applying PRED? on them."
(define list-of-strings?
(list-of string?))
-(define alist? list?)
+(define alist?
+ (match-lambda
+ (() #t)
+ ((head . tail) (and (pair? head) (alist? tail)))
+ (_ #f)))
(define serialize-file-like empty-serializer)