diff options
author | kartofen <mladenovnasko0@gmail.com> | 2024-11-16 17:20:23 +0200 |
---|---|---|
committer | kartofen <mladenovnasko0@gmail.com> | 2024-11-16 17:20:23 +0200 |
commit | 1945dbf8345a2b59e9057d21e38c78913272bdaa (patch) | |
tree | 6f908d5feb358d5deb37e3137684208408a52186 /files | |
parent | 0dd38d08551ac2fcff53eb604f6363f37b25aef9 (diff) |
Diffstat (limited to 'files')
-rw-r--r-- | files/test-lambda.l | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/files/test-lambda.l b/files/test-lambda.l index d58169a..3136452 100644 --- a/files/test-lambda.l +++ b/files/test-lambda.l @@ -92,3 +92,17 @@ (cond (((= 1 2) 3) ((= 1 (+ 1 1)) (+ 6 2)) (1 (quote test)))) + +(defmacro begin (vars) + (foldr (lambda (var rest) `((lambda (__) ,rest) ,var)) '__ vars)) + +(begin + ((define inc (lambda (a) (+ a 1))) + (inc 1))) + +(define inc (lambda (a) (+ a 1))) + +(begin + ((+ 0 1) + (define a inc))) + ;; (a 1))) |