Going through the Functional Programming Principles in Scala class in Coursera