Exercise 1.43

This commit is contained in:
Correl Roush 2014-06-02 11:48:46 -04:00
parent 1e33c212d1
commit f8324dd7d1

12
1-3.org
View file

@ -635,6 +635,18 @@ layout: org
Hint: You may find it convenient to use `compose' from *Note Hint: You may find it convenient to use `compose' from *Note
Exercise 1-42::. Exercise 1-42::.
----------------------------------------------------------------------
#+begin_src scheme :tangle yes
;; -------------------------------------------------------------------
;; Exercise 1.43
;; -------------------------------------------------------------------
(define (repeated f times)
(if (= times 1)
(lambda (x) (f x))
(compose f (repeated f (- times 1)))))
#+end_src
** Exercise 1.44 ** Exercise 1.44
The idea of "smoothing" a function is an important concept in The idea of "smoothing" a function is an important concept in
signal processing. If f is a function and dx is some small number, signal processing. If f is a function and dx is some small number,