mirror of
https://github.com/correl/sicp.git
synced 2024-11-23 11:09:57 +00:00
Exercise 1.41
This commit is contained in:
parent
ef7ca0372e
commit
013bbded12
1 changed files with 15 additions and 1 deletions
14
1-3.org
14
1-3.org
|
@ -578,6 +578,20 @@ layout: org
|
|||
(((double (double double)) inc) 5)
|
||||
#+end_src
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
#+begin_src scheme :tangle yes
|
||||
;; -------------------------------------------------------------------
|
||||
;; Exercise 1.41
|
||||
;; -------------------------------------------------------------------
|
||||
|
||||
(define (double f)
|
||||
(lambda (x) (f (f x))))
|
||||
|
||||
(((double (double double)) inc) 5)
|
||||
;Value: 21
|
||||
|
||||
#+end_src
|
||||
** Exercise 1.42
|
||||
Let f and g be two one-argument functions. The "composition" f
|
||||
after g is defined to be the function x |-> f(g(x)). Define a
|
||||
|
|
Loading…
Reference in a new issue