All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cats.syntax.either.scala Maven / Gradle / Ivy

package cats
package syntax

import cats.data.Xor

trait EitherSyntax {
  implicit def eitherSyntax[A, B](eab: Either[A, B]): EitherOps[A, B] = new EitherOps(eab)
}

class EitherOps[A, B](val eab: Either[A, B]) extends AnyVal {
  def toXor: A Xor B = Xor.fromEither(eab)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy