Start of topic | Skip to actions

Assignment 4 (Due Monday 9/24/2007 before class)

Weight: 150 points.

Submit via SVN.

"Natural number" in this assignment means the type defined in the text. Your file should include a natural data definition. The only built-in operations you may use with values of this type are add1, zero?, and sub1 (or their equivalents, such as (+ x 1) or, where 3 is the base case, (= x 3)).

Required problems (Must be submitted for grading):

  • Book Problems:
    • 11.2.4
      • Copy the definition of deep-list from the text. Be sure to provide your own function template.
    • 11.4.7
      • Include a data definition (following the text) of natural[>=limit].
      • Additional subproblem: Develop the function is-divisible?, which takes two naturals (the second a natural[>=1]) and checks whether the first is divisible by the second. (Because the arguments are naturals, you cannot use / here.) This function should be used in your implementation of is-not-divisible-by<=i.
    • 11.5.4
    • 12.2.2
    • 12.4.2
      • 12.4.1 is not required, but it sets up the context for 12.4.2, which you'll need to understand to correctly implement 12.4.2. You do need to provide all relevant data definitions for this problem, and you may find producing some example values, as in 12.4.1, helpful.
    • 13.0.5 (part 4 only)
    • 13.0.8 (part 2 only)

Access Permissions: (Please don't edit)


End of topic
Skip to actions | Back to top
Teaching.210hw4 moved from Teaching.210h4 on 21 Sep 2006 - 20:20 by DanSmith - put it back
Creative Commons LicenseThis work is licensed under a Creative Commons Attribution 2.5 License. Please follow our citation guidelines.