Blob
1 (define (test-case actual expected)2 (newline)3 (display "Actual: ")4 (display actual)5 (newline)6 (display "Expected: ")7 (display expected)8 (newline))10 (define (memq item x)11 (cond ((null? x) false)12 ((eq? item (car x)) x)13 (else (memq item (cdr x)))))14 (test-case (list 'a 'b 'c) '(a b c))15 (test-case (list (list 'george)) '((george)))16 (test-case (cdr '((x1 x2) (y1 y2))) '((y1 y2)))17 (test-case (cadr '((x1 x2) (y1 y2))) '(y1 y2))18 (test-case (pair? (car '(a short list))) #f)19 (test-case (memq 'red '((red shoes) (blue socks))) #f)20 (test-case (memq 'red '(red shoes blue socks)) '(red shoes blue socks))