Besides using match, is there an Option-like way to getOrElse the actual content of the Right or Left value?
match
getOrElse
Right
Left
In Scala 2.12 there is a getOrElse method for getting the "right" value but you cannot use it for the "left" value directly. However, you can do it like this: e.swap.getOrElse(42).
e.swap.getOrElse(42)