MCS-287 Chapter 4 Homework

  1. Do exercise 4.2.1 on page 106.
  2. Do exercise 4.3.3 on page 113. In the second part, regarding the ribcage structure, you may instead rewrite the apply-ff from page 96 to use your ribassoc that takes success and failure continuations.
  3. Do exercise 4.4.2 on page 116. You'll write a recursive procedure which, when applied to say 10, computes 10! without using a define or letrec.
  4. Do exercise 4.5.2 on page 124. Also, draw a diagram showing what happens. For the pairs that are mutated by set-cdr!, draw the original cdr pointer dotted and the new one solid.