Exercise 5.5 takeWhile in terms of foldRight