~ruther/guix-local

924bf42f093c3be51e5587f8ef8fc43afa86dce4 — Ludovic Courtès 4 months ago be39b5d
records: Avoid code duplication in ‘match-record-lambda’.

* guix/records.scm (match-record-lambda): Express in terms of ‘match-record’.

Change-Id: I5a577055fe47e01af4c282f1a76ea72648e778d1
1 files changed, 2 insertions(+), 3 deletions(-)

M guix/records.scm
M guix/records.scm => guix/records.scm +2 -3
@@ 680,8 680,7 @@ FIELD will be bound to its FIELD name within the returned procedure.  A syntax e
is raised if an unknown field is queried."
    ((_ type (field ...) body ...)
     (lambda (record)
       (if (eq? (struct-vtable record) type)
           (match-record-inner record type (field ...) body ...)
           (throw 'wrong-type-arg record))))))
       (match-record record type (field ...)
         body ...)))))

;;; records.scm ends here