Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • a number n;
  • a sum (make-sum ae1 ae2);
  • a product (make-prod ae1 ae2);
  • a difference (make-diff ae1 ae2); or
  • a quotient (make-quot ae1 ae2);

where n is a Scheme number, and ae1 and ae2 are arith-exprs .

The following 4 exercises involve the data type arith-expr. If you are asked to write a function(s), follow the design recipe: contract, purpose, examples/tests, template instantiation, code, testing (which happens automatically if when the examples are given in (check-expect ...) form). Follow the same recipe for any help function that you introduce.

...