Exercise 5.x2:
Suppose the following have been defined:
(define make-shifted
(lambda (shift-amount f)
(lambda (x)
(f (+ x shift-amount)))))
(define double
(lambda (x)
(* x 2)))
(define mystery
(make-shifted 5 double))
For each of the following expressions, indicate whether an error would
be signaled, the value would be a procedure, or the value would be
a number. If an error is signaled, explain briefly the nature of the
error. If the value is a procedure, specify how many arguments the
procedure expects. If the value is a number, specify which number.
make-shifted
mystery
(mystery 4)
(mystery double)
((make-shifted 3 double) 4)
((make-shifted 3 4) 5)
(make-shifted 3 double)
((make-shifted 3 (make-shifted 4 double)) 5)