Solutions for exercises from "Functional Programming in Scala" book