summaryrefslogtreecommitdiff
path: root/src/lisp/test.lisp
diff options
context:
space:
mode:
authorRich Hickey <richhickey@gmail.com>2006-05-01 20:02:32 +0000
committerRich Hickey <richhickey@gmail.com>2006-05-01 20:02:32 +0000
commitf4f1b702fe9dfd7c35c39def14db2195ce4ef306 (patch)
treedcf6cfc70baa1539636c4e3945f50c33935a52ce /src/lisp/test.lisp
parentbaee29c98b683834c7aaef8763848af7bdc0b439 (diff)
added and, or, not
mark letfns as assigned so they get boxed when closed over
Diffstat (limited to 'src/lisp/test.lisp')
-rw-r--r--src/lisp/test.lisp26
1 files changed, 21 insertions, 5 deletions
diff --git a/src/lisp/test.lisp b/src/lisp/test.lisp
index 37b550e0..f17e4ded 100644
--- a/src/lisp/test.lisp
+++ b/src/lisp/test.lisp
@@ -43,9 +43,25 @@
(defn fif (a b x y z)
(if a
- (if (if x y z)
- y
- z)
- b))
+ (if (if x y z)
+ y
+ z)
+ b))
-(defn fr (a b & c) c) \ No newline at end of file
+(defn fr (a b & c) c)
+
+(defn fnot (x y z)
+ (if (not x)
+ (not y)
+ (not z)))
+
+(defn forf (x y z)
+ (if (or x y)
+ x
+ (or x y z)))
+
+
+(defn fand (x y z)
+ (if (and x y)
+ x
+ (and x y z))) \ No newline at end of file