Scala function error “Type mismatch” in Intellij Idea vs Scala Eclipse
Using Scala we can define a function in a form when name and parameters are specified followed by the definition of the function body. For example: def abs(x: Double) = if (x < 0) -x else x As you can see, curly braces are not mandatory when all those elements are put in one line. … Read more