object \/ extends DisjunctionInstances with Serializable
- Source
- Either.scala
- Alphabetic
- By Inheritance
- \/
- Serializable
- DisjunctionInstances
- DisjunctionInstances0
- DisjunctionInstances1
- DisjunctionInstances2
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- implicit val DisjunctionAssociative: Associative[\/]
- Definition Classes
- DisjunctionInstances2
- implicit def DisjunctionBand[A, B](implicit arg0: Band[A], arg1: Band[B]): Band[\/[A, B]]
- Definition Classes
- DisjunctionInstances1
- implicit def DisjunctionEqual[A, B](implicit arg0: Equal[A], arg1: Equal[B]): Equal[\/[A, B]]
- Definition Classes
- DisjunctionInstances0
- implicit def DisjunctionInstances1[L]: Traverse[[β$0$]\/[L, β$0$]] with Monad[[β$1$]\/[L, β$1$]] with BindRec[[β$2$]\/[L, β$2$]] with Cozip[[β$3$]\/[L, β$3$]] with Plus[[β$4$]\/[L, β$4$]] with Alt[[β$5$]\/[L, β$5$]] with Optional[[β$6$]\/[L, β$6$]] with MonadError[[β$7$]\/[L, β$7$], L]
- Definition Classes
- DisjunctionInstances1
- implicit val DisjunctionInstances2: Bitraverse[\/]
- Definition Classes
- DisjunctionInstances2
- implicit def DisjunctionIsCovariantLeft[A]: IsCovariant[[α$18$]\/[α$18$, A]]
- Definition Classes
- DisjunctionInstances2
- implicit def DisjunctionIsCovariantRight[A]: IsCovariant[[β$16$]\/[A, β$16$]]
- Definition Classes
- DisjunctionInstances2
- implicit def DisjunctionMonoid[A, B](implicit arg0: Semigroup[A], arg1: Monoid[B]): Monoid[\/[A, B]]
- Definition Classes
- DisjunctionInstances
- implicit def DisjunctionOrder[A, B](implicit arg0: Order[A], arg1: Order[B]): Order[\/[A, B]]
- Definition Classes
- DisjunctionInstances
- implicit def DisjunctionSemigroup[A, B](implicit arg0: Semigroup[A], arg1: Semigroup[B]): Semigroup[\/[A, B]]
- Definition Classes
- DisjunctionInstances0
- implicit def DisjunctionShow[A, B](implicit arg0: Show[A], arg1: Show[B]): Show[\/[A, B]]
- Definition Classes
- DisjunctionInstances0
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def attempt[A, B](f: => B)(err: (Throwable) => A): \/[A, B]
Wrap a call to a deterministic partial function, making a total function.
Wrap a call to a deterministic partial function, making a total function. May be used to interface with legacy methods that do not have an FP equivalent.
The
err
callback must convert the non-referentially transparentThrowable
(which is anything caught by theNonFatal
construct) into a data type. The caller is trusted not to allow the stack trace to escape into theA
data type.Note that exceptions are extremely inefficient. Callers should consider validating the input to their partial function and exiting early.
If no useful information can be obtained from the
Throwable
, prefer scalaz.Maybe#attempt.For interfacing with non-deterministic blocks of code that may or may not throw
Throwable
, use scalaz.effect.IO.For interfacing with deterministic functions that violate the type system by returning
null
, use scalaz.Maybe#fromNullable. - def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def fromEither[A, B](e: Either[A, B]): \/[A, B]
Construct a disjunction value from a standard
scala.Either
. - def fromOption[A, B](ifNone: => A)(o: Option[B]): \/[A, B]
Construct a disjunction value from a standard
scala.Option
. - final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def l[B]: L[B]
Construct a left disjunction value but specify only the
right
type paramConstruct a left disjunction value but specify only the
right
type paramval x = \/.l[String](42) x: Int \/ String
Example: - def left[A, B]: (A) => \/[A, B]
Construct a left disjunction value.
- final def loopLeft[A, B, X](d: \/[A, B], left: (A) => \/[X, \/[A, B]], right: (B) => X): X
Spin in tail-position on the left value of the given disjunction.
Spin in tail-position on the left value of the given disjunction.
- Annotations
- @tailrec()
- final def loopRight[A, B, X](d: \/[A, B], left: (A) => X, right: (B) => \/[X, \/[A, B]]): X
Spin in tail-position on the right value of the given disjunction.
Spin in tail-position on the right value of the given disjunction.
- Annotations
- @tailrec()
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def r[B]: R[B]
Construct a right disjunction value but specify only the
left
type paramConstruct a right disjunction value but specify only the
left
type paramval x = \/.r[String](42) x: String \/ Int
Example: - def right[A, B]: (B) => \/[A, B]
Construct a right disjunction value.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()