Exercises from the Functional Programming with Scala book