guix-commits
[Top][All Lists]
Advanced

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

01/02: records: Slight simplification.


From: Ludovic Courtès
Subject: 01/02: records: Slight simplification.
Date: Mon, 17 Apr 2017 17:31:35 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit 94df39cc085fe81685315b0991f5f10ddc757e99
Author: Ludovic Courtès <address@hidden>
Date:   Sun Apr 16 17:25:11 2017 +0200

    records: Slight simplification.
    
    * guix/records.scm (make-syntactic-constructor): Simplify 'find' expression.
---
 guix/records.scm | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/guix/records.scm b/guix/records.scm
index f3f3aaf..7de5fcc 100644
--- a/guix/records.scm
+++ b/guix/records.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <address@hidden>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès 
<address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -134,10 +134,9 @@ fields, and DELAYED is the list of identifiers of delayed 
fields."
            ((_ (field value) (... ...))
             (let ((fields (map syntax->datum #'(field (... ...)))))
               (define (field-value f)
-                (or (and=> (find (lambda (x)
-                                   (eq? f (car (syntax->datum x))))
-                                 #'((field value) (... ...)))
-                           car)
+                (or (find (lambda (x)
+                            (eq? f (syntax->datum x)))
+                          #'(field (... ...)))
                     (wrap-field-value f (field-default-value f))))
 
               (let ((fields (append fields (map car default-values))))



reply via email to

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