Chapter 10 in Scala in Depth.