Well, have you looked at the signatures of the methods that accept a function in Scala?
For instance, IterableOnceOps contains a method find(p: (A) => Boolean): Option[A], that takes a predicate of the form (A) => Boolean. So obviously when you pass a lambda expression to the find() method, it must return a (A) => Boolean, which is Scala's equivalent of Java's Predicate<T> interface.
posted 1 year ago
In Java we can explicitly place a return statement (although it is not required in most cases). I will check whether it is possible in Scala too.
Scala do have Functional Interfaces like Java 8 in form of Function0, Function1 until Function22.. which take 0, 1..22 parameters respectively.
The return type of the Scala Lambda can be one of these 22 Functions.
They are not Functional Interfaces but they are traits something similar to interfaces.
These 22 traits also have a single abstract method(apply with equivalent number of parameters i.e. 0,1,...22) similar to functional interfaces in Java 8.
They can be found in the package named scala.
Hope this gives a clear picture of how scala lambdas work.