Functional Programming Principles in Scala - Solutions for Coursera exercises