Exercise 13.9
Suggestions
The only advertised ADT procedure this exercise requires you to write
is push!. However, you can write whatever unadvertised
procedures, for example, enlarge-stack!, you think are
necessary to support push!.
Replace the error message with:
- A message about enlarging the stack
- A call to a helper procedure that enlarges the stack
- A call to push the item onto the (enlarged) stack
Recall that the begin form allows you to perform multiple actions in
any branch of a conditional.