projects
/
sicp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
86219d7
)
solution to 1.29.
author
Ramakrishnan Muthukrishnan
<vu3rdd@gmail.com>
Tue, 4 May 2010 09:56:12 +0000
(15:26 +0530)
committer
Ramakrishnan Muthukrishnan
<vu3rdd@gmail.com>
Tue, 4 May 2010 09:56:12 +0000
(15:26 +0530)
src/sicp/ex1_29.clj
patch
|
blob
|
history
diff --git
a/src/sicp/ex1_29.clj
b/src/sicp/ex1_29.clj
index 33a3458510de28fca4e562689fc777403319a3ed..cf30a23af12f7f78a6f7748acd2554429081a355 100644
(file)
--- a/
src/sicp/ex1_29.clj
+++ b/
src/sicp/ex1_29.clj
@@
-3,12
+3,6
@@
[clojure.contrib trace test-is]))
;; simpson's rule of integration
-(defn sum [term a next b]
- (if (> a b)
- 0
- (+ (term a)
- (sum term (next a) next b))))
-
(defn make-fac [k n]
(cond (= k 0) 1
(= k n) 1