1
0
forked from tribes/guix

records: Avoid code duplication in ‘match-record-lambda’.

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

Change-Id: I5a577055fe47e01af4c282f1a76ea72648e778d1
This commit is contained in:
Ludovic Courtès
2025-09-30 10:42:42 +02:00
parent be39b5dee5
commit 924bf42f09
+2 -3
View File
@@ -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