My homework for the "Functional Programming Principles in Scala" Coursera class