From: Ramakrishnan Muthukrishnan Date: Wed, 1 Sep 2010 19:53:59 +0000 (+0530) Subject: solution to 2.53 X-Git-Url: https://git.rkrishnan.org/%5B/%5D%20/uri/%22file:?a=commitdiff_plain;h=87dfeda27fd25f62d74abfbfcd33bb9f2d0ad609;p=sicp.git solution to 2.53 --- diff --git a/src/sicp/ex2_53.clj b/src/sicp/ex2_53.clj new file mode 100644 index 0000000..9276ad0 --- /dev/null +++ b/src/sicp/ex2_53.clj @@ -0,0 +1,13 @@ +(ns sicp.ex2_53 + (:use [clojure.test] + [sicp.ch2_3 :only (memq)])) + +(deftest test-quoted-expr + (are [x y] [= x y] + (list 'a 'b 'c) '(a b c) + (list (list 'george)) '((george)) + (rest '((x1 x2) (y1 y2))) '((y1 y2)) + (second '((x1 x2) (y1 y2))) '(y1 y2) + (list? (first '(a short list))) false + (memq 'red '((red shoes) (blue socks))) false + (memq 'red '(red shoes blue socks)) '(red shoes blue socks))) \ No newline at end of file