Class

scalaz

\/-

Related Doc: package scalaz

Permalink

final case class \/-[+B](b: B) extends \/[Nothing, B] with Product with Serializable

A right disjunction

Often used to represent the success case of a result

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

Instance Constructors

  1. new \/-(b: B)

    Permalink

Type Members

  1. final class SwitchingDisjunction[X] extends AnyRef

    Permalink
    Definition Classes
    \/

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink

    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
    \/
  4. def :?>>[X](right: ⇒ X): SwitchingDisjunction[X]

    Permalink

    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
    \/
  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  6. def ===[AA >: Nothing, BB >: B](x: \/[AA, BB])(implicit EA: Equal[AA], EB: Equal[BB]): Boolean

    Permalink

    Compare two disjunction values for equality.

    Compare two disjunction values for equality.

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

    Permalink

    Run a validation function and back to disjunction again.

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

    Definition Classes
    \/
  8. def ap[AA >: Nothing, C](f: ⇒ \/[AA, (B) ⇒ C]): \/[AA, C]

    Permalink

    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
    \/
  9. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  10. val b: B

    Permalink
  11. def bimap[C, D](f: (Nothing) ⇒ C, g: (B) ⇒ D): \/[C, D]

    Permalink

    Binary functor map on this disjunction.

    Binary functor map on this disjunction.

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

    Permalink

    Binary functor traverse on this disjunction.

    Binary functor traverse on this disjunction.

    Definition Classes
    \/
  13. def clone(): AnyRef

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

    Permalink

    Compare two disjunction values for ordering.

    Compare two disjunction values for ordering.

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

    Permalink

    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
    \/
  16. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  17. def exists[BB >: B](p: (BB) ⇒ Boolean): Boolean

    Permalink

    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
    \/
  18. def filter[AA >: Nothing](p: (B) ⇒ Boolean)(implicit M: Monoid[AA]): \/[AA, B]

    Permalink

    Filter on the right of this disjunction.

    Filter on the right of this disjunction.

    Definition Classes
    \/
  19. def finalize(): Unit

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

    Permalink

    Bind through the right of this disjunction.

    Bind through the right of this disjunction.

    Definition Classes
    \/
  21. def fold[X](l: (Nothing) ⇒ X, r: (B) ⇒ X): X

    Permalink

    Catamorphism.

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

    Definition Classes
    \/
  22. def foldRight[Z](z: ⇒ Z)(f: (B, ⇒ Z) ⇒ Z): Z

    Permalink

    Fold on the right of this disjunction.

    Fold on the right of this disjunction.

    Definition Classes
    \/
  23. def forall[BB >: B](p: (BB) ⇒ Boolean): Boolean

    Permalink

    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
    \/
  24. def foreach(g: (B) ⇒ Unit): Unit

    Permalink

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  26. def getOrElse[BB >: B](x: ⇒ BB): BB

    Permalink

    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
    \/
  27. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  28. def isLeft: Boolean

    Permalink

    Return true if this disjunction is left.

    Return true if this disjunction is left.

    Definition Classes
    \/
  29. def isRight: Boolean

    Permalink

    Return true if this disjunction is right.

    Return true if this disjunction is right.

    Definition Classes
    \/
  30. def leftMap[C](f: (Nothing) ⇒ C): \/[C, B]

    Permalink

    Run the given function on the left value.

    Run the given function on the left value.

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

    Permalink

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

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

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

    Permalink

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

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

    Definition Classes
    \/
  33. def map[D](g: (B) ⇒ D): \/[Nothing, D]

    Permalink

    Map on the right of this disjunction.

    Map on the right of this disjunction.

    Definition Classes
    \/
  34. def merge[AA >: Nothing](implicit ev: <~<[B, AA]): AA

    Permalink

    Return the value from whichever side of the disjunction is defined, given a commonly assignable type.

    Return the value from whichever side of the disjunction is defined, given a commonly assignable type.

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

    Permalink
    Definition Classes
    AnyRef
  36. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  37. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  38. def orElse[C, BB >: B](x: ⇒ \/[C, BB]): \/[C, BB]

    Permalink

    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
    \/
  39. def recover[BB >: B](pf: PartialFunction[Nothing, BB]): \/[Nothing, BB]

    Permalink

    Run the given function on the left and return right with the result.

    Run the given function on the left and return right with the result.

    Definition Classes
    \/
  40. def recoverWith[AA >: Nothing, BB >: B](pf: PartialFunction[AA, \/[AA, BB]]): \/[AA, BB]

    Permalink

    Run the given function on the left and return the result.

    Run the given function on the left and return the result.

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

    Permalink

    Show for a disjunction value.

    Show for a disjunction value.

    Definition Classes
    \/
  42. def swap: \/[B, Nothing]

    Permalink

    Flip the left/right values in this disjunction.

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

    Definition Classes
    \/
  43. def swapped[AA, BB](k: (\/[B, Nothing]) ⇒ \/[BB, AA]): \/[AA, BB]

    Permalink

    Run the given function on this swapped value.

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

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

    Permalink
    Definition Classes
    AnyRef
  45. def toEither: Either[Nothing, B]

    Permalink

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

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

    Definition Classes
    \/
  46. def toList: List[B]

    Permalink

    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
    \/
  47. def toMaybe[BB >: B]: Maybe[BB]

    Permalink

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

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

    Definition Classes
    \/
  48. def toOption: Option[B]

    Permalink

    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
    \/
  49. def toStream: Stream[B]

    Permalink

    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
    \/
  50. def toThese: \&/[Nothing, B]

    Permalink

    Convert to a These.

    Convert to a These.

    Definition Classes
    \/
  51. def traverse[F[_], AA >: Nothing, D](g: (B) ⇒ F[D])(implicit arg0: Applicative[F]): F[\/[AA, D]]

    Permalink

    Traverse on the right of this disjunction.

    Traverse on the right of this disjunction.

    Definition Classes
    \/
  52. def unary_~: \/[B, Nothing]

    Permalink

    Flip the left/right values in this disjunction.

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

    Definition Classes
    \/
  53. def validation: Validation[Nothing, B]

    Permalink

    Convert to a Validation.

    Convert to a Validation.

    Definition Classes
    \/
  54. def validationNel[AA >: Nothing]: ValidationNel[AA, B]

    Permalink

    Convert to a ValidationNel.

    Convert to a ValidationNel.

    Definition Classes
    \/
  55. def validationed[AA, BB](k: (Validation[Nothing, B]) ⇒ Validation[AA, BB]): \/[AA, BB]

    Permalink

    Run a validation function and back to disjunction again.

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

    Definition Classes
    \/
  56. def valueOr[BB >: B](x: (Nothing) ⇒ BB): BB

    Permalink

    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
    \/
  57. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  60. def |[BB >: B](x: ⇒ BB): BB

    Permalink

    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
    \/
  61. def |||[C, BB >: B](x: ⇒ \/[C, BB]): \/[C, BB]

    Permalink

    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
    \/
  62. def ~[AA, BB](k: (\/[B, Nothing]) ⇒ \/[BB, AA]): \/[AA, BB]

    Permalink

    Run the given function on this swapped value.

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

    Definition Classes
    \/

Inherited from \/[Nothing, B]

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped