From 33f9093dcc6aafebe2b09358013f673fa301918e Mon Sep 17 00:00:00 2001 From: Ramakrishnan Muthukrishnan Date: Thu, 6 May 2010 08:58:55 +0530 Subject: [PATCH] solution to 1.34 --- src/sicp/ex1_34.clj | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/sicp/ex1_34.clj diff --git a/src/sicp/ex1_34.clj b/src/sicp/ex1_34.clj new file mode 100644 index 0000000..971f23c --- /dev/null +++ b/src/sicp/ex1_34.clj @@ -0,0 +1,14 @@ +(ns sicp.ex1_34 + (:use [sicp utils])) + +(defn f [g] + (g 2)) + +(deftest test-f-with-square-as-arg + (is (= (f square) 4))) + +;; (what iwll happen if we do (f f) +(comment +"It will first invoke (f 2), which will again invoke (2 2), but + 2 is not a function, so it will give an error at that point." +) \ No newline at end of file -- 2.45.2