remaining coding work for chapter 3 - but need more work on reasoning about foldRight