The lab is done in groups of 2 or 3. In the beginning of each file please write (in comments) the names fo all group members.
At the end of the lab please send me and your group partner(s) all your Scheme files as e-mail attachments. My e-mail is elenam at morris.umn.edu. The subject of your e-mail must be "1301 Lab 2" followed by "Final" or "Not final", depending on whether this is a final submission or you are still working on it. If you need to finish it, make sure to set up a time with your group partner(s) to finish the lab.
Due Friday, September 11, at 5pm. If you submit the final version during the lab, you are done.
Exercise 4.2.1, parts 1 and 4. Please follow the format in the in-class example: the contract, the purpose, examples, and tests.
Define a function that takes two parameters, x and y, and returns x - y if
x - y is non-negative and 0 otherwise. Please use cond
expression. If you know a way to define this function without
cond
, you my submit it in addition to the one
with cond
for 2 points of extra credit.