Question: The definition of a Lisp function func is shown below. As can be seen, this function uses LET* and LET, and calls seven other functions

The definition of a Lisp function func is shown below. As can be seen, this function uses LET* and LET, and calls seven other functions g1, g2, g3, h1, h2, h3, and f.

(defun func (a) ; line 1 (list (let* ((a (g1 a)) ; line 2 (b (g2 a))) ; line 3 (g3 a b)) ; line 4 (let ((a (h1 a)) ; line 5 (b (h2 a))) ; line 6 (h3 a b)) ; line 7 (f a))) ; line 8

Suppose this function func is called as follows: (func 19) Assume that this call does not produce any evaluation error. Then one or more of the six statements below about what happens during evaluation of (func 19) are true regardless of how the functions g1, g2, g3, h1, h2, h3, and f are defined. Select every statement that is true regardless of how g1, g2, g3, h1, h2, h3, and f are defined.

The value of the argument a in (g1 a) on line 2 during evaluation of the call (func 19) must be 19.

The value of the argument a in (g2 a) on line 3 during evaluation of the call (func 19) must be 19.

The value of the argument a in (h1 a) on line 5 during evaluation of the call (func 19) must be 19.

The value of the argument a in (h2 a) on line 6 during evaluation of the call (func 19) must be 19.

The value of the argument a in (h3 a b) on line 7 during evaluation of the call (func 19) must be 19.

The value of the argument a in (f a) on line 8 during evaluation of the call (func 19) must be 19.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!