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

scalaz.syntax.EitherOps.scala Maven / Gradle / Ivy

package scalaz
package syntax

final class EitherOps[A](val self: A) extends AnyVal {
  final def left[B]: (A \/ B) =
    -\/(self)

  final def right[B]: (B \/ A) =
    \/-(self)
}

trait ToEitherOps {
  implicit def ToEitherOps[A](a: A) = new EitherOps(a)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy