From 877b11ba8a56206a44efeadd4cd5d38f7bda31ac Mon Sep 17 00:00:00 2001
From: Ramakrishnan Muthukrishnan <vu3rdd@gmail.com>
Date: Sun, 20 Jun 2010 09:34:40 +0530
Subject: [PATCH] solution to 2.17

---
 src/sicp/ex2_17.clj | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 src/sicp/ex2_17.clj

diff --git a/src/sicp/ex2_17.clj b/src/sicp/ex2_17.clj
new file mode 100644
index 0000000..f58468d
--- /dev/null
+++ b/src/sicp/ex2_17.clj
@@ -0,0 +1,13 @@
+(ns sicp.ex2_17
+  (:use [sicp utils ch2_2]
+	[clojure test]))
+
+(defn last-pair [lst]
+  (if (= (length lst) 1)
+    lst
+    (last-pair (rest lst))))
+
+(deftest test-last-pair-1
+  (are [x y] [= x y]
+       (last-pair (list 1 2 3 4)) (list 4)
+       (last-pair (list 23 72 149 34)) (list 34)))
\ No newline at end of file
-- 
2.45.2