]> git.rkrishnan.org Git - sicp.git/blob - src/sicp/ex1_34.clj
Lazy version of evaluator and tests.
[sicp.git] / src / sicp / ex1_34.clj
1 (ns sicp.ex1_34
2   (:use [sicp utils]))
3
4 (defn f [g]
5   (g 2))
6
7 (deftest test-f-with-square-as-arg
8   (is (= (f square) 4)))
9
10 ;; (what iwll happen if we do (f f)
11 (comment
12 "It will first invoke (f 2), which will again invoke (2 2), but
13  2 is not a function, so it will give an error at that point."
14 )