solves ch04.exercises.2 (pg. 84)
ch04 exercise #4 primitive solution (pg. 84)