a solution for exercise 15.42 (c)
Merge pull request #18 from Queequeg92/master

a solution for exercise 15.42 (c)
Thx for contribution.