We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ca60481 commit a00a364Copy full SHA for a00a364
chapter2/exercise2-26.scm
@@ -2,6 +2,12 @@
2
(define x (list 1 2 3))
3
(define y (list 4 5 6))
4
5
-(append x y); => (1 2 3 4 5 6)
6
-(cons x y); => ((1 2 3) 4 5 6)
7
-(list x y); => ((1 2 3) (4 5 6))
+(module+ test
+ (require rackunit)
+
8
+ (test-case "Test for append, cons, and list"
9
+ (check-equal? (append x y) '(1 2 3 4 5 6))
10
+ (check-equal? (cons x y) '((1 2 3) 4 5 6))
11
+ (check-equal? (list x y) '((1 2 3) (4 5 6)))
12
+ )
13
0 commit comments