]> git.rkrishnan.org Git - sicp.git/blob - src/sicp/ex1_26.clj
Solution to 4.33. This had been difficult to get right, though conceptually it was
[sicp.git] / src / sicp / ex1_26.clj
1 (ns sicp.ex1_26
2   (:use [sicp utils]
3         [clojure.contrib trace test-is]))
4
5 ;;; exercise 1.26
6 (comment
7   "Instead of calling (square x), Louis now makes does (* x x). In the former,
8    case, x is evaluated only once, where as in the second, x gets evaluated
9    2x, 4x, 8x, 16x and so on (for any x which is recursive). So, if the original
10    computation is considered T(log_n), then the new process T(n). This can also
11    be illustrated with the call tree."
12 )