Coursera functional programming in Scala