Completed exercise 31, HtDP-2.