Permalink
Browse files

Merge branch 'master' of github.com:feeley/gambit

  • Loading branch information...
2 parents 2956e76 + 5480b30 commit 117922cea049d48e3bd9cabfdea2db02c113e558 @gnuvince gnuvince committed Jul 27, 2012
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -0,0 +1,29 @@
+(declare (extended-bindings))
+
+(define x1 '())
+(define x2 '(1))
+
+(define (test2 x y)
+ (println (and x y))
+ (println (if (and x y) 11 22))
+ (println (and (##not x) y))
+ (println (if (and (##not x) y) 11 22))
+ (println (and x (##not y)))
+ (println (if (and x (##not y)) 11 22))
+ (println (and (##not x) (##not y)))
+ (println (if (and (##not x) (##not y)) 11 22))
+ (println (##not (and x y)))
+ (println (if (##not (and x y)) 11 22))
+ (println (##not (and (##not x) y)))
+ (println (if (##not (and (##not x) y)) 11 22))
+ (println (##not (and x (##not y))))
+ (println (if (##not (and x (##not y))) 11 22))
+ (println (##not (and (##not x) (##not y))))
+ (println (if (##not (and (##not x) (##not y))) 11 22)))
+
+(define (test x)
+ (test2 x x1)
+ (test2 x x2))
+
+(test x1)
+(test x2)
@@ -1,8 +1,7 @@
(declare
(standard-bindings)
(extended-bindings)
- (not safe)
-)
+ (not safe))
(define x (##cons 11 22))
@@ -0,0 +1,52 @@
+(declare
+ (standard-bindings)
+ (extended-bindings)
+ (not safe))
+
+(define x01 '(1 2 3 4))
+(define x02 '((1 2) 3 4))
+(define x03 '(((1 2)) 3 4))
+(define x04 '(1 (2) 3 4))
+(define x05 '((1 2 3) 4))
+(define x06 '((((1 2 3))) 4))
+(define x07 '(1 ((2 3)) 4))
+(define x08 '((1 ((2))) 3 4))
+(define x09 '(1 2 (3) 4))
+(define x10 '(((1 2)) 3 4))
+(define x11 '(1 (2 (3 4))))
+(define x12 '((1 (2 3) 4)))
+(define x13 '(1 2 ((3)) 4))
+(define x14 '(1 (2 3 4)))
+(define x15 '((1 2 3 4)))
+(define x16 '(1 2 3 4 5))
+
+(println (##car x01))
+(println (##cdr x01))
+(println (##caar x02))
+(println (##cadr x01))
+(println (##cdar x02))
+(println (##cddr x01))
+(println (##caaar x03))
+(println (##caadr x04))
+(println (##cadar x02))
+(println (##caddr x01))
+(println (##cdaar x03))
+(println (##cdadr x04))
+(println (##cddar x05))
+(println (##cdddr x01))
+(println (##caaaar x06))
+(println (##caaadr x07))
+(println (##caadar x08))
+(println (##caaddr x09))
+(println (##cadaar x10))
+(println (##cadadr x11))
+(println (##caddar x05))
+(println (##cadddr x01))
+(println (##cdaaar x06))
+(println (##cdaadr x07))
+(println (##cdadar x12))
+(println (##cdaddr x13))
+(println (##cddaar x03))
+(println (##cddadr x14))
+(println (##cdddar x15))
+(println (##cddddr x16))
View
@@ -0,0 +1,15 @@
+(declare (extended-bindings))
+
+(define l1 '())
+(define l2 '(1 2 3))
+
+(define (test2 x y)
+ (println (##eq? x y))
+ (println (if (##eq? x y) 11 22)))
+
+(define (test x)
+ (test2 x l1)
+ (test2 x l2))
+
+(test l1)
+(test l2)
View
@@ -0,0 +1,10 @@
+(declare (extended-bindings))
+
+(define l1 '())
+(define l2 '(1 2 3))
+
+(define (test x)
+ (println (if x 11 22)))
+
+(test l1)
+(test l2)
View
@@ -0,0 +1,10 @@
+(declare
+ (standard-bindings)
+ (extended-bindings)
+ (not safe))
+
+(define x (##list 11 22 33))
+
+(println x)
+(println (##car x))
+(println (##cdr x))
View
@@ -0,0 +1,10 @@
+(declare (extended-bindings))
+
+(define v1 '())
+(define v2 '(1 2 3))
+
+(define (test x)
+ (println (if (##not x) 11 22)))
+
+(test v1)
+(test v2)
View
@@ -0,0 +1,29 @@
+(declare (extended-bindings))
+
+(define v1 '())
+(define v2 '(1 2 3))
+
+(define (test2 x y)
+ (println (or x y))
+ (println (if (or x y) 11 22))
+ (println (or (##not x) y))
+ (println (if (or (##not x) y) 11 22))
+ (println (or x (##not y)))
+ (println (if (or x (##not y)) 11 22))
+ (println (or (##not x) (##not y)))
+ (println (if (or (##not x) (##not y)) 11 22))
+ (println (##not (or x y)))
+ (println (if (##not (or x y)) 11 22))
+ (println (##not (or (##not x) y)))
+ (println (if (##not (or (##not x) y)) 11 22))
+ (println (##not (or x (##not y))))
+ (println (if (##not (or x (##not y))) 11 22))
+ (println (##not (or (##not x) (##not y))))
+ (println (if (##not (or (##not x) (##not y))) 11 22)))
+
+(define (test x)
+ (test2 x v1)
+ (test2 x v2))
+
+(test v1)
+(test v2)
@@ -0,0 +1,2 @@
+(println '())
+(println '(1 2 3))
@@ -0,0 +1,3 @@
+(declare (extended-bindings) (not safe))
+
+(println (##make-string 5 #\!))
@@ -0,0 +1,29 @@
+(declare (extended-bindings))
+
+(define x1 '#())
+(define x2 '#(1 2 3))
+
+(define (test2 x y)
+ (println (and x y))
+ (println (if (and x y) 11 22))
+ (println (and (##not x) y))
+ (println (if (and (##not x) y) 11 22))
+ (println (and x (##not y)))
+ (println (if (and x (##not y)) 11 22))
+ (println (and (##not x) (##not y)))
+ (println (if (and (##not x) (##not y)) 11 22))
+ (println (##not (and x y)))
+ (println (if (##not (and x y)) 11 22))
+ (println (##not (and (##not x) y)))
+ (println (if (##not (and (##not x) y)) 11 22))
+ (println (##not (and x (##not y))))
+ (println (if (##not (and x (##not y))) 11 22))
+ (println (##not (and (##not x) (##not y))))
+ (println (if (##not (and (##not x) (##not y))) 11 22)))
+
+(define (test x)
+ (test2 x x1)
+ (test2 x x2))
+
+(test x1)
+(test x2)
View
@@ -0,0 +1,15 @@
+(declare (extended-bindings))
+
+(define v1 '#())
+(define v2 '#(1 2 3))
+
+(define (test2 x y)
+ (println (##eq? x y))
+ (println (if (##eq? x y) 11 22)))
+
+(define (test x)
+ (test2 x v1)
+ (test2 x v2))
+
+(test v1)
+(test v2)
View
@@ -0,0 +1,10 @@
+(declare (extended-bindings))
+
+(define v1 '())
+(define v2 '(1 2 3))
+
+(define (test x)
+ (println (if x 11 22)))
+
+(test v1)
+(test v2)
@@ -0,0 +1,10 @@
+(declare (extended-bindings))
+
+(define v1 '#())
+(define v2 '#(1 2 3))
+
+(define (test x)
+ (println (if (##not x) 11 22)))
+
+(test v1)
+(test v2)
View
@@ -0,0 +1,29 @@
+(declare (extended-bindings))
+
+(define v1 '#())
+(define v2 '#(1 2 3))
+
+(define (test2 x y)
+ (println (or x y))
+ (println (if (or x y) 11 22))
+ (println (or (##not x) y))
+ (println (if (or (##not x) y) 11 22))
+ (println (or x (##not y)))
+ (println (if (or x (##not y)) 11 22))
+ (println (or (##not x) (##not y)))
+ (println (if (or (##not x) (##not y)) 11 22))
+ (println (##not (or x y)))
+ (println (if (##not (or x y)) 11 22))
+ (println (##not (or (##not x) y)))
+ (println (if (##not (or (##not x) y)) 11 22))
+ (println (##not (or x (##not y))))
+ (println (if (##not (or x (##not y))) 11 22))
+ (println (##not (or (##not x) (##not y))))
+ (println (if (##not (or (##not x) (##not y))) 11 22)))
+
+(define (test x)
+ (test2 x v1)
+ (test2 x v2))
+
+(test v1)
+(test v2)
@@ -0,0 +1,2 @@
+(println '#())
+(println '#(1 2 3))
@@ -0,0 +1,8 @@
+(declare
+ (standard-bindings)
+ (extended-bindings)
+ (not safe))
+
+(define x (##vector 11 22))
+
+(println x)
View
@@ -2,5 +2,5 @@
* Time stamp of last source code repository commit.
*/
-#define ___STAMP_YMD 20120711
-#define ___STAMP_HMS 124255
+#define ___STAMP_YMD 20120718
+#define ___STAMP_HMS 191635

0 comments on commit 117922c

Please sign in to comment.