From 96982196c4fae2b053f931b5988e52d7cf80fe45 Mon Sep 17 00:00:00 2001 From: "W. Kosior" Date: Mon, 15 Jul 2024 17:33:25 +0200 Subject: Add syntactic sugar for initializing fields with list-values. --- src/guile/de-paul-records.scm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/guile') diff --git a/src/guile/de-paul-records.scm b/src/guile/de-paul-records.scm index f45e6b4..fddd1da 100644 --- a/src/guile/de-paul-records.scm +++ b/src/guile/de-paul-records.scm @@ -141,7 +141,12 @@ (identifier? #'field-name) (syntax->field-init #'(field-name #:=> (lambda (field-name) value-update-expr - value-update-expr-rest ...)))))) + value-update-expr-rest ...)))) + + ((field-name #:list value-item-expr value-item-expr-rest ...) + (syntax->field-init #'(field-name + (list value-item-expr + value-item-expr-rest ...)))))) (define-immutable-record-type (make-record-init) record-init? (inherit record-init-inherit record-init-set-inherit) -- cgit v1.2.3