|
|
|
|
|
by hrjet
4481 days ago
|
|
It's not enough for compactly expressing imperative logic. In Scala: resultOption match {
case Some(x) => println(x)
case None => println("error")
}
Without pattern match: if (resultOption.isDefined) {
println(resultOption.get)
} else {
println("Error")
}
The .get is the problem. |
|