aboutsummaryrefslogtreecommitdiff
path: root/src/guile/de-paul-records.scm
diff options
context:
space:
mode:
authorW. Kosior <koszko@koszko.org>2024-07-15 17:33:25 +0200
committerW. Kosior <koszko@koszko.org>2024-07-15 17:33:25 +0200
commit96982196c4fae2b053f931b5988e52d7cf80fe45 (patch)
tree8f04233f2e569ce855a8f03a1e1f482502df696d /src/guile/de-paul-records.scm
parentd0e907d486754ff109de56490045fae671bac9a9 (diff)
downloadde-paul-records-96982196c4fae2b053f931b5988e52d7cf80fe45.tar.gz
de-paul-records-96982196c4fae2b053f931b5988e52d7cf80fe45.zip
Add syntactic sugar for initializing fields with list-values.
Diffstat (limited to 'src/guile/de-paul-records.scm')
-rw-r--r--src/guile/de-paul-records.scm7
1 files changed, 6 insertions, 1 deletions
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 <record-init> (make-record-init) record-init?
(inherit record-init-inherit record-init-set-inherit)