Functional Programming in Scala book exercises