Scala Cookbook: Recipes for Object-Oriented and Functional Programming - Chp09 Recipe 9.5 Using Closures