Solutions to Exercises Functional Programming in Scala