projects
/
sicp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aaafb02
)
modification to make-center-percentage to make use of make-center-width
author
Ramakrishnan Muthukrishnan
<vu3rdd@gmail.com>
Mon, 14 Jun 2010 03:19:26 +0000
(08:49 +0530)
committer
Ramakrishnan Muthukrishnan
<vu3rdd@gmail.com>
Mon, 14 Jun 2010 03:19:26 +0000
(08:49 +0530)
src/sicp/ex2_12.clj
patch
|
blob
|
history
diff --git
a/src/sicp/ex2_12.clj
b/src/sicp/ex2_12.clj
index 9cf9019f61b25d8eb5ff3dbe7b58bd4d54edb52e..510cd994de84d4fd8c1833affe86b465531c981e 100644
(file)
--- a/
src/sicp/ex2_12.clj
+++ b/
src/sicp/ex2_12.clj
@@
-3,9
+3,8
@@
[clojure.test]))
(defn make-center-percent [c p]
- (let [u (+ c (* c p 0.01))
- l (- c (* c p 0.01))]
- (make-interval l u)))
+ (let [w (* c p 0.01)]
+ (make-center-width c w)))
(defn percentage [i]
(let [c (center i)