From 87dfeda27fd25f62d74abfbfcd33bb9f2d0ad609 Mon Sep 17 00:00:00 2001 From: Ramakrishnan Muthukrishnan Date: Thu, 2 Sep 2010 01:23:59 +0530 Subject: [PATCH] solution to 2.53 --- src/sicp/ex2_53.clj | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/sicp/ex2_53.clj 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 -- 2.45.2