Add exercise 4.28

This commit is contained in:
Oliver Payne 2023-08-14 22:58:10 +01:00
parent 9eb77c7e02
commit c5418454ed
1 changed files with 13 additions and 0 deletions

13
mceval/4-28.txt Normal file
View File

@ -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.