aboutsummaryrefslogtreecommitdiffstats
path: root/lib/scheme/base/20-let.csc
diff options
context:
space:
mode:
authorRose Hogenson <rhogenson@posteo.net>2022-08-04 21:51:19 -0700
committerRose Hogenson <rhogenson@posteo.net>2022-08-04 21:51:19 -0700
commit09a63498f4de78d0c6e484d406544d8e7653b8ca (patch)
tree92c3bd53ee351692196fbfdb5b4e050c340f76f3 /lib/scheme/base/20-let.csc
parentde9353e9c24c448aaa11e24f2ccfb1820acb3d34 (diff)
downloadchromatopelma-09a63498f4de78d0c6e484d406544d8e7653b8ca.tar.zst
Add begin.
Diffstat (limited to 'lib/scheme/base/20-let.csc')
-rw-r--r--lib/scheme/base/20-let.csc13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/scheme/base/20-let.csc b/lib/scheme/base/20-let.csc
index 4a02dfa..2b54d28 100644
--- a/lib/scheme/base/20-let.csc
+++ b/lib/scheme/base/20-let.csc
@@ -6,6 +6,7 @@
letrec
letrec*)
(import (only (csc builtins)
+ builtin-sequence
define-syntax
lambda))
(begin
@@ -74,4 +75,14 @@
body1 body2 ...)
(let ((name1 val1))
(let* ((name2 val2) ...)
- body1 body2 ...))))))
+ body1 body2 ...)))))
+
+
+ (define-syntax begin
+ (syntax-rules ()
+ ((begin)
+ #f)
+ ((begin expr)
+ expr)
+ ((begin body1 body2 ...)
+ (builtin-sequence body1 (begin body2 ...))))))