Functions as First Class Citizens in Scala