Determine that the processes are iterative or recursive, Programming Languages

Each of the following two procedures defines a method for adding two positive integers in  terms of the procedures inc, which increments its argument by 1, and dec, which decrements its argument by 1:

(define (plus1 a b)

(if (= a 0)

b

(inc (plus1 (dec a) b))))

(define (plus2 a b)

(if (= a 0)

b

(plus2 (dec a) (inc b))))
 
Using the substitution model, illustrate the process generated by each procedure in evaluating (+ 2 5). Are these processes iterative or recursive?

Posted Date: 3/22/2013 5:11:24 AM | Location : United States







Related Discussions:- Determine that the processes are iterative or recursive, Assignment Help, Ask Question on Determine that the processes are iterative or recursive, Get Answer, Expert's Help, Determine that the processes are iterative or recursive Discussions

Write discussion on Determine that the processes are iterative or recursive
Your posts are moderated
Related Questions
Python Programming hmw help!! Write a program that ask the user to input the followings: number of shares, stock price, and broker commission. Last month jim purchased some stock

Write and test a simple perl program on the linux platform.  You may use any linux system you wish, including the Suse linux installed in the lab. Activities. Note:  to r

please decode the following as it is answer for my assisgnment for python: Ñò üOLOc  @ s‚ d „ Z d „ Z g Z xYe oQe ƒ e d ƒ i ƒ Z e d j oI e d

You must implement the control mechanism for the robot arm so that it can safely move the blocks from the source pile to their destination, without colliding with any obstacles or

Find out the selling cost average for packages developed in Pascal

We want a program that will allow us to print a "grade list" of the students in a class. The program should loop, asking for a name, midterm score, and final score. It should th

i am stuck on array part from getting response of jquery. anyone could help?

Hi how can I upload my hw to you experts?