Chapter 4 in Scala in Depth.