Your cart is currently empty!
In this lab you’ll be working out some basic function definitions. We’ll work the first problem together as a class and then you can tackle the rest on your own. Lab 3 All of your problems for this week come from the text book. Use comments in your code to label each problem with an…
In this lab you’ll be working out some basic function definitions. We’ll work the first problem together as a class and then you can tackle the rest on your own.
Lab 3
All of your problems for this week come from the text book. Use comments in your code to label each problem with an exercise num-ber. For each function you should provide a brief description of the function’s purpose as well as several concrete examples. Write the statement of purpose as a comment above the definition and the examples as comments below the definition as seen in the pseudo-example given below:
1
2 ; Exercise 192
3
4 ; This function computes … given …
5 (define (foo x y z)
…)
7
8 ; (foo 1 2 3) –> 14
9 ; (foo 4 5 6) –> 21
Do the following problems from section 2.1 of the text: 11, 12, 13, 15, 16, 17,19, and 20.