From f5cfef579b8e7428166722c8c0b01fdd981cef85 Mon Sep 17 00:00:00 2001 From: Correl Roush Date: Mon, 2 Jun 2014 12:07:43 -0400 Subject: [PATCH] Exercise 1.44 --- 1-3.org | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/1-3.org b/1-3.org index bb89ff6..142f200 100644 --- a/1-3.org +++ b/1-3.org @@ -659,7 +659,23 @@ layout: org function". Show how to generate the n-fold smoothed function of any given function using `smooth' and `repeated' from *Note Exercise 1-43::. - + + ---------------------------------------------------------------------- + + #+begin_src scheme :tangle yes + ;; ------------------------------------------------------------------- + ;; Exercise 1.44 + ;; ------------------------------------------------------------------- + + (define (smooth f) + (lambda (x) (/ (+ (f (- x dx)) + (f x) + (f (+ x dx))) + 3))) + + (define (smooth-n f times) + ((repeated smooth times) f)) + #+end_src ** Exercise 1.45 We saw in section *Note 1-3-3:: that attempting to compute square roots by naively finding a fixed point of y |-> x/y does not