Chapter 5 in Scala in Depth.