6.10

Assignment 7b

home work!

Programming Language ISL

Due Date: Thursday at 9:00pm (Week 7)

Purpose Practice with abstraction in functions

Finger Exercises

Exercise 2 HtDP Exercise 240

Graded Exercises

Exercise 3 HtDP Exercise 238. Read the question carefully: its answer involves six parts:
  • The first common abstracted function;

  • The new definitions of the inf-1 and sup-1 functions in terms of that common abstraction such that inf-1 behaves the same as inf from figure 89, and likewise for sup-1;

  • The explanation for why these functions are slow

  • The redefinitions of inf and sup from figure 89 to use min and max;

  • The new definitions of inf-2 and sup-2 using the common abstraction and using min and max;

  • The explanation for why these functions are faster than the prior versions.

Exercise 4 HtDP Exercise 242. Note: the "remaining steps" here include completing the occurs function.