From 4308cd4abe5a75fb8410df929eac687cbd04032b Mon Sep 17 00:00:00 2001 From: kartofen Date: Sun, 8 Sep 2024 18:36:07 +0300 Subject: update mempool and add implement hash array mapped trie (not integrated) --- files/test-lambda.l | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'files') 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)))) -- cgit v1.2.3