solution to 2.23
authorRamakrishnan Muthukrishnan <vu3rdd@gmail.com>
Fri, 2 Jul 2010 07:17:37 +0000 (12:47 +0530)
committerRamakrishnan Muthukrishnan <vu3rdd@gmail.com>
Fri, 2 Jul 2010 07:17:37 +0000 (12:47 +0530)
src/sicp/ex2_23.clj [new file with mode: 0644]

diff --git a/src/sicp/ex2_23.clj b/src/sicp/ex2_23.clj
new file mode 100644 (file)
index 0000000..36b04e6
--- /dev/null
@@ -0,0 +1,8 @@
+(ns sicp.ex2_23
+  (:use [sicp utils]))
+
+(defn for-each [f lst]
+  (when (not (empty? lst))
+    (do
+      (f (first lst))
+      (recur f (rest lst)))))
\ No newline at end of file