ScholarMatic | 24/7 Homework Help

ScholarMatic Will Help You Write Your Essays and Term Papers

Answered » You can buy a ready-made answer or pick a professional tutor to order an original one.

Some Problems

by | Nov 30, 2023 | questions

Exercises are from the book: Essentials of Programming Languages – Third Edition
By Daniel P. Friedman and Mitchell Wand

All exercises must be written in Scheme and must run on the DrRacket tool.
Exercises are from Chapters 3 and 4.

Delivery by October 27, 2013 (firm)

Document Preview:

Exercises are from the book: Essentials of Programming Languages – Third Edition By Daniel P. Friedman and Mitchell Wand All exercises must be written in Scheme and must run on the DrRacket tool. 1. Exercise 3.6 ) Extend the language by adding a new operator minus that takes one argument, n, and returns -n. For example, the value of minus(-(minus(5),9)) should be 14. 2. Exercise 3.7 ) Extend the language by adding operators for addition, multiplication, and integer quotient. 3. Exercise 3.9 ) Add list processing operations to the language, including cons, car, cdr, null? and emptylist. A list should be able to contain any expressed value, including another list. Give the definitions of the expressed and denoted values of the language, as in section 3.2.2. For example, let x = 4 in cons(x, cons(cons(-(x,1), emptylist), emptylist)) should return an expressed value that represents the list (4 (3)). 4. Exercise 3.10 ) Add an operation list to the language. This operation should take any number of arguments, and return an expressed value containing the list of their values. For example, let x = 4 in list(x, -(x,1), -(x,3)) should return an expressed value that represents the list (4 3 1). 5. Exercise 3.12 ) Add to the defined language a facility that adds a cond expression. Use the grammar Expression ::= cond {Expression ==> Expression}* end In this expression, the expressions on the left-hand sides of the ==>’s are evaluated in order until one of them returns a true value. Then the value of the entire expression is the value of the corresponding right-hand expression. If none of the tests succeeds, the expression should report an error. 6. Exercise 3.16 ) Extend the language so that a let declaration can declare an arbitrary number of variables, using the grammar Expression ::= let {Identifier = Expression}* in Expression As in Scheme’s let, each of the right-hand sides is evaluated in the current environment, and the body is evaluated with each new variable bound to…

Attachments:


ScholarMatic: Explanation & Answer

Your ready answer from a verified tutor is just a click away for as little as $14.99


  

Click Order Now to get 100% Original Answer Customized to your instructions!

HOME TO CERTIFIED WRITERS

Why Place An Order With Us?

  • Certified Editors
  • 24/7 Customer Support
  • Profesional Research
  • Easy to Use System Interface
  • Student Friendly Pricing

Have a similar question?

PLAGIRAISM FREE PAPERS

All papers we provide are well-researched, properly formatted and cited.

TOP QUALITY

All papers we provide are well-researched, properly formatted and cited.

HIGHLY SECURED

All papers we provide are well-researched, properly formatted and cited.

ScholarMatic: Get Started

Assignment Writing Service

Feel safe and secure when placing an order on our portal!
Fruitful cooperation begins with solid guarantees, and we are professional enough to promise perfect results. Let’s get it started!