Chapter 9 map in terms of flatMap