Chapter 7 in Scala in Depth.