Example of exploiting stream paradigm, and exercise 3.61 ~ 3.65