Implement some solutions to exercises 1 through 3.