From: Ramakrishnan Muthukrishnan Date: Wed, 1 Sep 2010 19:54:55 +0000 (+0530) Subject: text examples until 2.3.2 X-Git-Url: https://git.rkrishnan.org/%5B/frontends/%22news.html/cyclelanguage?a=commitdiff_plain;h=459fe71b0c615f97e2d3da95de8ede45d834712d;p=sicp.git text examples until 2.3.2 --- diff --git a/src/sicp/ch2_3.clj b/src/sicp/ch2_3.clj new file mode 100644 index 0000000..28df094 --- /dev/null +++ b/src/sicp/ch2_3.clj @@ -0,0 +1,7 @@ +(ns sicp.ch2_3) + +(defn memq [item x] + (cond + (empty? x) false + (= (first x) item) x + :else (memq item (rest x)))) \ No newline at end of file