Implement number-range, which takes two integers and produces a list of consecutive integers starting with the first integer and ending with the second.
Implement all-combinations, which takes a natural number n and produces all possible lists (list i j) where i and j are natural numbers less or equal to n.
This will require a helper function that traverses from 0 to n for i and another helper to traverse from 0 to n for j.
Cannibals and missionaries problem description, HtDP section 32.2.
Exercise 32.2.2, make-BOAT-LAODS, which is a refinement of all-combinations.
Exercises 32.2.1 and 32.2.3. For the latter, use filter to filter BOAT-LOADS for the current state, and then use map.
Exercises 32.2.4 and 32.2.5.
|Last update: Wednesday, October 15th, email@example.com|