scalaz

# -\/

#### case class -\/[+A](a: A) extends \/[A, Nothing] with Product with Serializable

Source
Either.scala
Linear Supertypes
Serializable, Serializable, Product, Equals, \/[A, Nothing], AnyRef, Any
Ordering
1. Alphabetic
2. By inheritance
Inherited
1. -\/
2. Serializable
3. Serializable
4. Product
5. Equals
6. \/
7. AnyRef
8. Any
1. Hide All
2. Show all
Visibility
1. Public
2. All

### Type Members

1. #### sealed trait SwitchingDisjunction[X] extends AnyRef

Definition Classes
\/

### Value Members

1. #### final def !=(arg0: AnyRef): Boolean

Definition Classes
AnyRef
2. #### final def !=(arg0: Any): Boolean

Definition Classes
Any
3. #### final def ##(): Int

Definition Classes
AnyRef → Any
4. #### def +++[AA >: A, BB >: Nothing](x: ⇒ \/[AA, BB])(implicit M1: Semigroup[BB], M2: Semigroup[AA]): \/[AA, BB]

Sums up values inside disjunction, if both are left or right.

Sums up values inside disjunction, if both are left or right. Returns first left otherwise.

```\/-(v1) +++ \/-(v2) ￢ﾆﾒ \/-(v1 + v2)
\/-(v1) +++ -\/(v2) ￢ﾆﾒ -\/(v2)
-\/(v1) +++ \/-(v2) ￢ﾆﾒ -\/(v1)
-\/(v1) +++ -\/(v2) ￢ﾆﾒ -\/(v1 + v2)```
Definition Classes
\/
5. #### def :?>>[X](right: ⇒ X): SwitchingDisjunction[X]

If this disjunction is right, return the given X value, otherwise, return the X value given to the return value.

If this disjunction is right, return the given X value, otherwise, return the X value given to the return value.

Definition Classes
\/
6. #### final def ==(arg0: AnyRef): Boolean

Definition Classes
AnyRef
7. #### final def ==(arg0: Any): Boolean

Definition Classes
Any
8. #### def ===[AA >: A, BB >: Nothing](x: \/[AA, BB])(implicit EA: Equal[AA], EB: Equal[BB]): Boolean

Compare two disjunction values for equality.

Compare two disjunction values for equality.

Definition Classes
\/
9. #### def @\?/[AA, BB](k: (Validation[A, Nothing]) ⇒ Validation[AA, BB]): \/[AA, BB]

Run a validation function and back to disjunction again.

Run a validation function and back to disjunction again. Alias for `validationed`

Definition Classes
\/

11. #### def ap[AA >: A, C](f: ⇒ \/[AA, (Nothing) ⇒ C]): \/[AA, C]

Apply a function in the environment of the right of this disjunction.

Apply a function in the environment of the right of this disjunction.

Definition Classes
\/
12. #### final def asInstanceOf[T0]: T0

Definition Classes
Any
13. #### def bimap[C, D](f: (A) ⇒ C, g: (Nothing) ⇒ D): \/[C, D]

Binary functor map on this disjunction.

Binary functor map on this disjunction.

Definition Classes
\/
14. #### def bitraverse[F[+_], C, D](f: (A) ⇒ F[C], g: (Nothing) ⇒ F[D])(implicit arg0: Functor[F]): F[\/[C, D]]

Binary functor traverse on this disjunction.

Binary functor traverse on this disjunction.

Definition Classes
\/
15. #### def clone(): AnyRef

Attributes
protected[java.lang]
Definition Classes
AnyRef
Annotations
@throws( ... )
16. #### def compare[AA >: A, BB >: Nothing](x: \/[AA, BB])(implicit EA: Order[AA], EB: Order[BB]): Ordering

Compare two disjunction values for ordering.

Compare two disjunction values for ordering.

Definition Classes
\/
17. #### def ensure[AA >: A](onLeft: ⇒ AA)(f: (Nothing) ⇒ Boolean): \/[AA, Nothing]

Ensures that the right value of this disjunction satisfies the given predicate, or returns left with the given value.

Ensures that the right value of this disjunction satisfies the given predicate, or returns left with the given value.

Definition Classes
\/
18. #### final def eq(arg0: AnyRef): Boolean

Definition Classes
AnyRef
19. #### def exists[BB >: Nothing](p: (BB) ⇒ Boolean): Boolean

Return `true` if this disjunction is a right value satisfying the given predicate.

Return `true` if this disjunction is a right value satisfying the given predicate.

Definition Classes
\/
20. #### def filter[AA >: A](p: (Nothing) ⇒ Boolean)(implicit M: Monoid[AA]): \/[AA, Nothing]

Filter on the right of this disjunction.

Filter on the right of this disjunction.

Definition Classes
\/
21. #### def finalize(): Unit

Attributes
protected[java.lang]
Definition Classes
AnyRef
Annotations
@throws( classOf[java.lang.Throwable] )
22. #### def flatMap[AA >: A, D](g: (Nothing) ⇒ \/[AA, D]): \/[AA, D]

Bind through the right of this disjunction.

Bind through the right of this disjunction.

Definition Classes
\/
23. #### def fold[X](l: (A) ⇒ X, r: (Nothing) ⇒ X): X

Catamorphism.

Catamorphism. Run the first given function if left, otherwise, the second given function.

Definition Classes
\/
24. #### def foldRight[Z](z: ⇒ Z)(f: (Nothing, ⇒ Z) ⇒ Z): Z

Fold on the right of this disjunction.

Fold on the right of this disjunction.

Definition Classes
\/
25. #### def forall[BB >: Nothing](p: (BB) ⇒ Boolean): Boolean

Return `true` if this disjunction is a left value or the right value satisfies the given predicate.

Return `true` if this disjunction is a left value or the right value satisfies the given predicate.

Definition Classes
\/
26. #### def foreach(g: (Nothing) ⇒ Unit): Unit

Run the side-effect on the right of this disjunction.

Run the side-effect on the right of this disjunction.

Definition Classes
\/
27. #### final def getClass(): Class[_]

Definition Classes
AnyRef → Any
28. #### def getOrElse[BB >: Nothing](x: ⇒ BB): BB

Return the right value of this disjunction or the given default if left.

Return the right value of this disjunction or the given default if left. Alias for `|`

Definition Classes
\/
29. #### final def isInstanceOf[T0]: Boolean

Definition Classes
Any
30. #### def isLeft: Boolean

Return `true` if this disjunction is left.

Return `true` if this disjunction is left.

Definition Classes
\/
31. #### def isRight: Boolean

Return `true` if this disjunction is right.

Return `true` if this disjunction is right.

Definition Classes
\/
32. #### def leftMap[C](f: (A) ⇒ C): \/[C, Nothing]

Run the given function on the left value.

Run the given function on the left value.

Definition Classes
\/
33. #### def loopl[AA >: A, BB >: Nothing, X](left: (AA) ⇒ \/[X, \/[AA, BB]], right: (BB) ⇒ X): X

Spin in tail-position on the left value of this disjunction.

Spin in tail-position on the left value of this disjunction.

Definition Classes
\/
34. #### def loopr[AA >: A, BB >: Nothing, X](left: (AA) ⇒ X, right: (BB) ⇒ \/[X, \/[AA, BB]]): X

Spin in tail-position on the right value of this disjunction.

Spin in tail-position on the right value of this disjunction.

Definition Classes
\/
35. #### def map[D](g: (Nothing) ⇒ D): \/[A, D]

Map on the right of this disjunction.

Map on the right of this disjunction.

Definition Classes
\/
36. #### final def ne(arg0: AnyRef): Boolean

Definition Classes
AnyRef
37. #### final def notify(): Unit

Definition Classes
AnyRef
38. #### final def notifyAll(): Unit

Definition Classes
AnyRef
39. #### def orElse[AA >: A, BB >: Nothing](x: ⇒ \/[AA, BB]): \/[AA, BB]

Return this if it is a right, otherwise, return the given value.

Return this if it is a right, otherwise, return the given value. Alias for `|||`

Definition Classes
\/
40. #### def show[AA >: A, BB >: Nothing](implicit SA: Show[AA], SB: Show[BB]): Cord

Show for a disjunction value.

Show for a disjunction value.

Definition Classes
\/
41. #### def swap: \/[Nothing, A]

Flip the left/right values in this disjunction.

Flip the left/right values in this disjunction. Alias for `unary_~`

Definition Classes
\/
42. #### def swapped[AA, BB](k: (\/[Nothing, A]) ⇒ \/[BB, AA]): \/[AA, BB]

Run the given function on this swapped value.

Run the given function on this swapped value. Alias for `~`

Definition Classes
\/
43. #### final def synchronized[T0](arg0: ⇒ T0): T0

Definition Classes
AnyRef
44. #### def toEither: Either[A, Nothing]

Convert to a core `scala.Either` at your own peril.

Convert to a core `scala.Either` at your own peril.

Definition Classes
\/
45. #### def toList: List[Nothing]

Return an empty list or list with one element on the right of this disjunction.

Return an empty list or list with one element on the right of this disjunction.

Definition Classes
\/
46. #### def toOption: Option[Nothing]

Return an empty option or option with one element on the right of this disjunction.

Return an empty option or option with one element on the right of this disjunction. Useful to sweep errors under the carpet.

Definition Classes
\/
47. #### def toStream: Stream[Nothing]

Return an empty stream or stream with one element on the right of this disjunction.

Return an empty stream or stream with one element on the right of this disjunction.

Definition Classes
\/
48. #### def traverse[F[+_], D](g: (Nothing) ⇒ F[D])(implicit arg0: Applicative[F]): F[\/[A, D]]

Traverse on the right of this disjunction.

Traverse on the right of this disjunction.

Definition Classes
\/
49. #### def unary_~: \/[Nothing, A]

Flip the left/right values in this disjunction.

Flip the left/right values in this disjunction. Alias for `swap`

Definition Classes
\/
50. #### def validation: Validation[A, Nothing]

Convert to a validation.

Convert to a validation.

Definition Classes
\/
51. #### def validationed[AA, BB](k: (Validation[A, Nothing]) ⇒ Validation[AA, BB]): \/[AA, BB]

Run a validation function and back to disjunction again.

Run a validation function and back to disjunction again. Alias for `@\?/`

Definition Classes
\/
52. #### def valueOr[BB >: Nothing](x: (A) ⇒ BB): BB

Return the right value of this disjunction or run the given function on the left.

Return the right value of this disjunction or run the given function on the left.

Definition Classes
\/
53. #### final def wait(): Unit

Definition Classes
AnyRef
Annotations
@throws( ... )
54. #### final def wait(arg0: Long, arg1: Int): Unit

Definition Classes
AnyRef
Annotations
@throws( ... )
55. #### final def wait(arg0: Long): Unit

Definition Classes
AnyRef
Annotations
@throws( ... )
56. #### def |[BB >: Nothing](x: ⇒ BB): BB

Return the right value of this disjunction or the given default if left.

Return the right value of this disjunction or the given default if left. Alias for `getOrElse`

Definition Classes
\/
57. #### def |||[AA >: A, BB >: Nothing](x: ⇒ \/[AA, BB]): \/[AA, BB]

Return this if it is a right, otherwise, return the given value.

Return this if it is a right, otherwise, return the given value. Alias for `orElse`

Definition Classes
\/
58. #### def ~[AA, BB](k: (\/[Nothing, A]) ⇒ \/[BB, AA]): \/[AA, BB]

Run the given function on this swapped value.

Run the given function on this swapped value. Alias for `swapped`

Definition Classes
\/