mirror of
https://github.com/correl/sicp.git
synced 2024-11-23 19:19:56 +00:00
Exercise 1.43
This commit is contained in:
parent
1e33c212d1
commit
f8324dd7d1
1 changed files with 12 additions and 0 deletions
12
1-3.org
12
1-3.org
|
@ -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,
|
||||||
|
|
Loading…
Reference in a new issue