Type inference on method return type
The return type of a method is either the type of the last statement in the block that defines it, or the type of the expression that defines it, in the absence of a block. When you use return inside a method, you introduce another statement from which the method may return. That means Scala … Read more