chap7:  flatMap