knr2: Completed exercise 1-22.