Allows use of a merge method to extract values from Either instances regardless of whether they are Left or Right.
val l = Left(List(1)): Either[List[Int], Vector[Int]] val r = Right(Vector(1)): Either[List[Int], Vector[Int]] l.merge: Seq[Int] // List(1) r.merge: Seq[Int] // Vector(1)
| Supertypes |
|---|
© 2002-2022 EPFL, with contributions from Lightbend.
Licensed under the Apache License, Version 2.0.
https://scala-lang.org/api/3.2.0/scala/util/Either$$MergeableEither.html