14 lines
374 B
Plaintext
14 lines
374 B
Plaintext
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.
|