Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
In Scala it is very common to define anonymous functions of the following form
{ case foo: Bar => foobar(foo) case _ => throw new RuntimeException() }
These case style anonymous functions are not supported yet by the Scala API. Thus, one has to write redundant code to name the function parameter.
What works is the following pattern, but it is not intuitive for someone coming from Scala:
dataset.map{
_ match{
case foo:Bar => ...
}
}