Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Order of Evaluation

In pure lambda calculus, the order of evaluation of subexpressions does not effect the value of an expression. The same is true for pure Lisp: if a pure Lisp expres- sion has a value under the ordinary Lisp interpreter, then changing the order of evaluation of subterms cannot produce a different value.

To give aconcrete example, consider the following section of Lisp code:

(define a ( ... ))

(define b ( ... ))... (define f (lambda (x y z) (cons (car x) (cons (car y) (cdr z))))) ... (f e1 e2 e3)

The ordinary evaluation order for the function call (f e1 e2 e3) is to evaluate the arguments e1 e2 e3 from left to right and then pass this list of values to the function f.

Give an example of Lisp expressions e1 e2 e3, possibly by using functions rplaca or rplacd with side effects, so that evaluating expressions from left to right gives a different result from that obtained by evaluating them from right to left. You may ?ll in speci?c declarations for a or b if you like and refer to a or b in your expressions. Explain brie?y, in one or two sentences, why one order of evaluation is different from the other.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M91631482

Have any Question?


Related Questions in Computer Engineering

Question list and describe two forms of organizational

Question: List and describe two forms of organizational change. How does organizational change create business innovation? Give an example. Reply substantively to two other learners with thought provoking statements and ...

Youre trying to save to buy a new 190000 bmw 3 series

You're trying to save to buy a new $190,000 BMW 3 series sedan. You have $40,000 today that can be invested t your bank. The bank pays 4.8% annual interest on its accounts.  How long will it be before you have enough to ...

A what is gdp deflator and how is it calculatedb if gdp

(a) What is GDP deflator and how is it calculated? (b) If GDP deflator for the year 2014 and 2015 are 105 and 108 respectively, then calculate the increase in price level between 2014 and 2015.

The police lieutenant in charge of the traffic division

The police lieutenant in charge of the traffic division reviews the number of traffic citations issued by each of the police officers in his division. He finds that the mean number of citations written by each officer is ...

Decision support systems dss what sorts of dss tools do you

Decision support systems (DSS). What sorts of DSS tools do you use at your work - e.g., what-if analysis, sensitivity analysis, scenario analysis, goal-seeking analysis, optimization analysis, etc.? Even if you don't use ...

Why are we in the golden age of technology entrepreneurship

Why are we in the 'golden age' of technology entrepreneurship? What factors are helping entrepreneurs more rapidly achieve their vision, and with a lower cost?

Assignment wireless applications advances advantages and

Assignment: Wireless Applications, Advances, Advantages, and Disadvantages The adoption of wireless technologies varies from one industry to another, and is often based on the benefits provided versus the challenges, imp ...

Question ransomware to pay or not to pay when it comes to

Question: Ransomware: To pay or not to pay? When it comes to corporate data, should corporations pay? Can you trust paying? What can be done to protect against ransomware?Would you pay if it were your own personal data? ...

There are several different vdi technologies and many

There are several different VDI technologies and many different VDI providers. For this discussion select, one VDI software provider offering a Centralized VDI approach and another provider offering Hosted VDI. Compare t ...

A suppose you purchase a 3-year zero-coupon bond with face

(a) Suppose you purchase a 3-year zero-coupon bond with face value of $1000 and a price of $850. What is the bond's yield? If you hold the bond to maturity, what will be your effective annual return? (b) Now suppose you ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As