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