Scala Functional Programming Learnings