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:
+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
|
||||
|
||||
Reference in New Issue
Block a user