From: Ramakrishnan Muthukrishnan Date: Fri, 2 Jul 2010 07:17:37 +0000 (+0530) Subject: solution to 2.23 X-Git-Url: https://git.rkrishnan.org/vdrive/%5B/%5D%20//%22file:/%22?a=commitdiff_plain;h=ffc4b65493da1891a7c3fc65947891aea8cd0cc6;p=sicp.git solution to 2.23 --- diff --git a/src/sicp/ex2_23.clj b/src/sicp/ex2_23.clj new file mode 100644 index 0000000..36b04e6 --- /dev/null +++ b/src/sicp/ex2_23.clj @@ -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