Functional Programming Principles in Scala assignments