From 94c38bb38aa65cb6e03a815b86940cb2dc544aeb Mon Sep 17 00:00:00 2001 From: Ramakrishnan Muthukrishnan <vu3rdd@gmail.com> Date: Mon, 14 Jun 2010 08:49:26 +0530 Subject: [PATCH] modification to make-center-percentage to make use of make-center-width --- src/sicp/ex2_12.clj | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/sicp/ex2_12.clj b/src/sicp/ex2_12.clj index 9cf9019..510cd99 100644 --- 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) -- 2.45.2