Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added some tests. Implementing lists/pairs but not completed.
- Loading branch information
Showing
10 changed files
with
482 additions
and
73 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
(declare (extended-bindings)) | ||
|
||
(define c1 #\A) | ||
(define c2 #\B) | ||
|
||
(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 c1) | ||
(test2 x c2)) | ||
|
||
(test c1) | ||
(test c2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
(declare (extended-bindings) (not safe)) | ||
|
||
(define c1 #\A) | ||
(define notchar 42) | ||
|
||
(define (test x) | ||
(println (##char? x))) | ||
|
||
(test c1) | ||
(test notchar) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
(declare (extended-bindings)) | ||
|
||
(define c1 #\A) | ||
(define c2 #\B) | ||
|
||
(define (test2 x y) | ||
(println (##eq? x y)) | ||
(println (if (##eq? x y) 11 22))) | ||
|
||
(define (test x) | ||
(test2 x c1) | ||
(test2 x c2)) | ||
|
||
(test c1) | ||
(test c2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
(declare (extended-bindings)) | ||
|
||
(define c1 #\A) | ||
(define c2 #\B) | ||
|
||
(define (test x) | ||
(println (if x 11 22))) | ||
|
||
(test c1) | ||
(test c2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
(declare (extended-bindings)) | ||
|
||
(define c1 #\A) | ||
(define c2 #\B) | ||
|
||
(define (test x) | ||
(println (if (##not x) 11 22))) | ||
|
||
(test c1) | ||
(test c2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
(declare (extended-bindings)) | ||
|
||
(define c1 #\A) | ||
(define c2 #\B) | ||
|
||
(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 c1) | ||
(test2 x c2)) | ||
|
||
(test c1) | ||
(test c2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
(println #\A) | ||
(println #\B) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
(declare (extended-bindings)) | ||
|
||
(define f (##not 123)) | ||
(define t (##not f)) | ||
(define c #\A) | ||
|
||
(define (test x) | ||
(println (##char? x)) | ||
(println (if (##char? x) 11 22))) | ||
|
||
(test 0) | ||
(test 1) | ||
(test f) | ||
(test t) | ||
(test c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters