Add exercise 4.28
This commit is contained in:
parent
9eb77c7e02
commit
c5418454ed
|
@ -0,0 +1,13 @@
|
|||
Exercise 4.28: The actual-value call is necessary in the case where
|
||||
the procedure to be applied is itself returned from another procudure.
|
||||
|
||||
Contrived example:
|
||||
|
||||
(define (choose-proc p1 p2) p1)
|
||||
(define (f x) (+ x 1))
|
||||
(define (g x) (+ x 4))
|
||||
|
||||
((choose-proc f g) 3)
|
||||
|
||||
Without the force-it call, we would have a thunk in the first position
|
||||
of the expression, which would not work.
|
Loading…
Reference in New Issue