a write a procedure called add x y that adds two


(a) Write a procedure called (add x y) that adds two numbers in a recursive manner. Specifically, note that x + y = (x + 1) + (y - 1) and x + 0 = x.

(b) Using the substitution model, and applicative order evaluation, show how (add 4 3) works.

(c) Using (a), write a procedure called (add3 x y z) that adds 3 numbers together.

(d) Using the substitution model, and applicative order evaluation, show how (add3 3 2 1) works.

 

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: a write a procedure called add x y that adds two
Reference No:- TGS0219166

Expected delivery within 24 Hours