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 week 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.