aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/let.scm16
-rw-r--r--test/noargs.scm2
2 files changed, 12 insertions, 6 deletions
diff --git a/test/let.scm b/test/let.scm
index 67858b6..3fb57a7 100644
--- a/test/let.scm
+++ b/test/let.scm
@@ -1,7 +1,11 @@
-(define one 1)
+(define-syntax let
+ (syntax-rules ()
+ ((let ((name val) ...) body1 ...)
+ ((lambda (name ...) body1 ...)
+ val ...))))
-(let (two (+ one 1)
- three (+ one 2))
- (+ two three))
-
- \ No newline at end of file
+(define inc
+ (let ((dy 1))
+ (lambda (y) (+ y dy))))
+
+(inc 41)
diff --git a/test/noargs.scm b/test/noargs.scm
new file mode 100644
index 0000000..9139c2a
--- /dev/null
+++ b/test/noargs.scm
@@ -0,0 +1,2 @@
+((lambda ()
+ (* 2 3))) \ No newline at end of file