By hand calculation, find the Collatz sequences for 1, 2, 3, and 4. Use DrScheme to find the Collatz sequences for 25, 26, 27, and 28.
Rewrite the longest-list-in-list procedure, from the lab on local
bindings, so that it yields the same result but is tail-recursive.
Develop a tail-recursive version of the factorial procedure presented in
the reading on recursion with integers.
Develop a tail-recursive version of the iota procedure described in
exercise 4 of the lab on
recursion with integers.
Is the prime-factors-kernel
procedure presented in the reading on indefinite recursion
tail-recursive? If so, explain why. If not, explain why not and develop
and test a tail-recursive version of it.