Functional Programming Principles in Scala course work