From: Ramakrishnan Muthukrishnan Date: Thu, 6 May 2010 03:28:55 +0000 (+0530) Subject: solution to 1.34 X-Git-Url: https://git.rkrishnan.org/specifications/%5B/%5D%20/%22doc.html/somewhere?a=commitdiff_plain;h=33f9093dcc6aafebe2b09358013f673fa301918e;p=sicp.git solution to 1.34 --- 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