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