Exercise 1.42

This commit is contained in:
Correl Roush 2014-06-02 11:45:24 -04:00
parent 013bbded12
commit 1e33c212d1

13
1-3.org
View file

@ -602,7 +602,18 @@ layout: org
((compose square inc) 6) ((compose square inc) 6)
49 49
#+end_src #+end_src
----------------------------------------------------------------------
#+begin_src scheme :tangle yes
;; -------------------------------------------------------------------
;; Exercise 1.42
;; -------------------------------------------------------------------
(define (compose f g)
(lambda (x) (f (g x))))
#+end_src
** Exercise 1.43 ** Exercise 1.43
If f is a numerical function and n is a positive If f is a numerical function and n is a positive
integer, then we can form the nth repeated application of f, which integer, then we can form the nth repeated application of f, which