aboutsummaryrefslogtreecommitdiff
path: root/files/test-lambda.l
diff options
context:
space:
mode:
authorkartofen <mladenovnasko0@gmail.com>2024-09-08 18:36:07 +0300
committerkartofen <mladenovnasko0@gmail.com>2024-09-08 18:36:07 +0300
commit4308cd4abe5a75fb8410df929eac687cbd04032b (patch)
tree4a5871db2168cb96deab29be7aed36262511c0c1 /files/test-lambda.l
parentdb32849ce314a93db01f877a057a91022fec7c8b (diff)
update mempool and add implement hash array mapped trie (not integrated)
Diffstat (limited to 'files/test-lambda.l')
-rw-r--r--files/test-lambda.l7
1 files changed, 7 insertions, 0 deletions
diff --git a/files/test-lambda.l b/files/test-lambda.l
index 29e1f52..d58169a 100644
--- a/files/test-lambda.l
+++ b/files/test-lambda.l
@@ -77,6 +77,9 @@
(defmacro let* (vars body)
(foldr (lambda (var rest) `(let (,var) ,rest)) body vars))
+(defmacro cond (vars)
+ (foldr (lambda (clause rest) `(if ,(car clause) ,(cdar clause) ,rest)) 1 vars))
+
(let ((a 9)
(b 13))
(+ a b))
@@ -85,3 +88,7 @@
(b (- a 3))
(c (+ a b)))
(- c 3))
+
+(cond (((= 1 2) 3)
+ ((= 1 (+ 1 1)) (+ 6 2))
+ (1 (quote test))))