Versions Compared

Key

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

...

Do not bother writing a contract, purpose statement, or template instantiation for this function since we recommend that you throw this code away after the lab is over. The name has been changed to Filter} to avoid colliding with the Scheme library function named {{filter.

Exercises

  • Load one of the more interesing Scheme programs you have written (such as HW2) into DrScheme. (If you did the preceding optional exercise, you can use this program.) Perform the "Check Syntax" command to identify where each variable is bound. Recall that when you put your cursor above a binding instance, it will draw arrows to the uses, and when you put your cursor above a use, it will draw an arrow to its binding instance.
  • Using the Scheme library function filter, develop a function that takes a list of numbers and returns a list of
    all the positive numbers in that list.

...