Scala Cookbook: Recipes for Object-Oriented and Functional Programming chp09 9.2 Functions as variables