Given type A on both sides, that is, Either[A, A], we can use Either.merge
...to extract values from Either instances regardless of whether they are
Left or Right.
Note if left and right types differ then result becomes Any:
val e: Either[Int, String] = Right("hello")
e.merge // hello: Any