guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

05/08: services: configuration: Rewrite 'alist?' procedure.


From: guix-commits
Subject: 05/08: services: configuration: Rewrite 'alist?' procedure.
Date: Thu, 8 Dec 2022 07:09:14 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit 9336baf258d6fc19e5dfa5bcfc7892d239f24837
Author: Bruno Victal <mirai@makinata.eu>
AuthorDate: Thu Dec 1 18:09:47 2022 +0000

    services: configuration: Rewrite 'alist?' procedure.
    
    * gnu/services/configuration.scm (alist?): Rewrite.
    
    Co-authored-by: Ludovic Court├Ęs <ludo@gnu.org>
---
 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 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)
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]