Functional Programming Principles in Scala Task1