object BioEither extends BioEither
- Alphabetic
- By Inheritance
- BioEither
- BioEither
- Error2
- ErrorAccumulatingOps2
- Monad2
- ApplicativeError2
- Bifunctor2
- Guarantee2
- Applicative2
- Functor2
- RootBifunctor
- Root
- PredefinedHelper
- DivergenceHelper
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- type Divergence = Nondivergent
- Definition Classes
- DivergenceHelper
- type IsPredefined = NotPredefined
- Definition Classes
- PredefinedHelper
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def *>[E, A, B](f: Either[E, A], next: => Either[E, B]): Either[E, B]
execute two operations in order, return result of second operation
execute two operations in order, return result of second operation
- Definition Classes
- Monad2 → Applicative2
- def <*[E, A, B](f: Either[E, A], next: => Either[E, B]): Either[E, A]
execute two operations in order, same as
*>
, but return result of first operationexecute two operations in order, same as
*>
, but return result of first operation- Definition Classes
- Monad2 → Applicative2
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def InnerF: Functor2[Either]
- Definition Classes
- ApplicativeError2 → Bifunctor2
- def accumulateErrorsImpl[ColL[_], ColR[x] <: IterableOnce[x], E, E1, A, B, B1, AC](col: ColR[A])(effect: (A) => Either[E, B], onLeft: (E) => IterableOnce[E1], init: AC, onRight: (AC, B) => AC, end: (AC) => B1)(implicit buildL: Factory[E1, ColL[E1]]): Either[ColL[E1], B1]
- Attributes
- protected[this]
- Definition Classes
- BioEither → ErrorAccumulatingOps2
- def as[E, A, B](r: Either[E, A])(v: => B): Either[E, B]
- Definition Classes
- Functor2
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def attempt[E, A](r: Either[E, A]): Either[Nothing, Either[E, A]]
- Definition Classes
- Error2
- def bimap[E, A, E2, B](r: Either[E, A])(f: (E) => E2, g: (A) => B): Either[E2, B]
- Definition Classes
- Error2 → Bifunctor2
- final def catchAll[E, A, E2](r: Either[E, A])(f: (E) => Either[E2, A]): Either[E2, A]
- def catchSome[E, A, E1 >: E](r: Either[E, A])(f: PartialFunction[E, Either[E1, A]]): Either[E1, A]
- Definition Classes
- Error2
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def collect[E, A, B](l: Iterable[A])(f: (A) => Either[E, Option[B]]): Either[E, List[B]]
- Definition Classes
- Applicative2
- def collectFirst[E, A, B](l: Iterable[A])(f: (A) => Either[E, Option[B]]): Either[E, Option[B]]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def fail[E](v: => E): Either[E, Nothing]
- Definition Classes
- BioEither → ApplicativeError2
- Annotations
- @inline()
- def filter[E, A](l: Iterable[A])(f: (A) => Either[E, Boolean]): Either[E, List[A]]
- Definition Classes
- Applicative2
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def find[E, A](l: Iterable[A])(f: (A) => Either[E, Boolean]): Either[E, Option[A]]
- final def flatMap[E, A, B](r: Either[E, A])(f: (A) => Either[E, B]): Either[E, B]
- def flatSequence[E, A](l: Iterable[Either[E, Iterable[A]]]): Either[E, List[A]]
- Definition Classes
- Applicative2
- def flatSequenceAccumErrors[ColR[x] <: IterableOnce[x], ColIn[x] <: IterableOnce[x], ColL[_], E, A](col: ColR[Either[ColL[E], ColIn[A]]])(implicit buildR: Factory[A, ColR[A]], buildL: Factory[E, ColL[E]], iterL: (ColL[E]) => IterableOnce[E]): Either[ColL[E], ColR[A]]
flatSequence
with error accumulationflatSequence
with error accumulation- Definition Classes
- ErrorAccumulatingOps2
- def flatTraverse[E, A, B](l: Iterable[A])(f: (A) => Either[E, Iterable[B]]): Either[E, List[B]]
- Definition Classes
- Applicative2
- def flatTraverseAccumErrors[ColR[x] <: IterableOnce[x], ColIn[x] <: IterableOnce[x], ColL[_], E, A, B](col: ColR[A])(f: (A) => Either[ColL[E], ColIn[B]])(implicit buildR: Factory[B, ColR[B]], buildL: Factory[E, ColL[E]], iterL: (ColL[E]) => IterableOnce[E]): Either[ColL[E], ColR[B]]
flatTraverse
with error accumulationflatTraverse
with error accumulation- Definition Classes
- ErrorAccumulatingOps2
- def flatten[E, A](r: Either[E, Either[E, A]]): Either[E, A]
- Definition Classes
- Monad2
- def flip[E, A](r: Either[E, A]): Either[A, E]
- Definition Classes
- Error2
- def foldLeft[E, A, AC](col: Iterable[A])(z: AC)(op: (AC, A) => Either[E, AC]): Either[E, AC]
- final def forever[E, A](r: Either[E, A]): Either[E, Nothing]
- Definition Classes
- Applicative2
- Annotations
- @inline()
- final def fromEither[E, V](effect: => Either[E, V]): Either[E, V]
- Definition Classes
- BioEither → ApplicativeError2
- Annotations
- @inline()
- final def fromOption[E, A](errorOnNone: => E)(effect: => Option[A]): Either[E, A]
- Definition Classes
- BioEither → ApplicativeError2
- Annotations
- @inline()
- def fromOption[E, A](errorOnNone: => E, r: Either[E, Option[A]]): Either[E, A]
Extracts the optional value or fails with the
errorOnNone
errorExtracts the optional value or fails with the
errorOnNone
error- Definition Classes
- Error2
- def fromOptionF[E, A](fallbackOnNone: => Either[E, A], r: Either[E, Option[A]]): Either[E, A]
Extracts the optional value, or executes the
fallbackOnNone
effectExtracts the optional value, or executes the
fallbackOnNone
effect- Definition Classes
- Monad2
- def fromOptionOr[E, A](valueOnNone: => A, r: Either[E, Option[A]]): Either[E, A]
Extracts the optional value, or returns the given
valueOnNone
valueExtracts the optional value, or returns the given
valueOnNone
value- Definition Classes
- Functor2
- final def fromTry[A](effect: => Try[A]): Either[Throwable, A]
- Definition Classes
- BioEither → ApplicativeError2
- Annotations
- @inline()
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def guarantee[E, A](f: Either[E, A], cleanup: Either[Nothing, Unit]): Either[E, A]
- Definition Classes
- BioEither → Guarantee2
- Annotations
- @inline()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def ifThenElse[E, E1, A](cond: Either[E, Boolean])(ifTrue: => Either[E1, A], ifFalse: => Either[E1, A])(implicit ev: <:<[E, E1]): Either[E1, A]
- Definition Classes
- Monad2
- Annotations
- @inline()
- final def ifThenElse[E, A](cond: Boolean)(ifTrue: => Either[E, A], ifFalse: => Either[E, A]): Either[E, A]
- Definition Classes
- Applicative2
- Annotations
- @inline()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def iterateUntil[E, A](r: Either[E, A])(p: (A) => Boolean): Either[E, A]
Execute an action repeatedly until its result satisfies the given predicate and return that result, discarding all others.
Execute an action repeatedly until its result satisfies the given predicate and return that result, discarding all others.
- Definition Classes
- Monad2
- def iterateUntilF[E, A](init: A)(f: (A) => Either[E, A])(p: (A) => Boolean): Either[E, A]
Apply an effectful function iteratively until its result satisfies the given predicate and return that result.
Apply an effectful function iteratively until its result satisfies the given predicate and return that result.
- Definition Classes
- Monad2
- def iterateWhile[E, A](r: Either[E, A])(p: (A) => Boolean): Either[E, A]
Execute an action repeatedly until its result fails to satisfy the given predicate and return that result, discarding all others.
Execute an action repeatedly until its result fails to satisfy the given predicate and return that result, discarding all others.
- Definition Classes
- Monad2
- def iterateWhileF[E, A](init: A)(f: (A) => Either[E, A])(p: (A) => Boolean): Either[E, A]
Apply an effectful function iteratively until its result fails to satisfy the given predicate and return that result.
Apply an effectful function iteratively until its result fails to satisfy the given predicate and return that result.
- Definition Classes
- Monad2
- def leftFlatMap[E, A, E2](r: Either[E, A])(f: (E) => Either[Nothing, E2]): Either[E2, A]
- Definition Classes
- Error2
- def leftMap[E, A, E2](r: Either[E, A])(f: (E) => E2): Either[E2, A]
- Definition Classes
- Bifunctor2
- def leftMap2[E, A, E2, E3](firstOp: Either[E, A], secondOp: => Either[E2, A])(f: (E, E2) => E3): Either[E3, A]
map errors from two operations into a new error if both fail
map errors from two operations into a new error if both fail
- Definition Classes
- Error2 → ApplicativeError2
- final def map[E, A, B](r: Either[E, A])(f: (A) => B): Either[E, B]
- final def map2[E, A, B, C](firstOp: Either[E, A], secondOp: => Either[E, B])(f: (A, B) => C): Either[E, C]
execute two operations in order, map their results
execute two operations in order, map their results
- Definition Classes
- BioEither → Monad2 → Applicative2
- Annotations
- @inline()
- 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 orElse[E, A, E2](r: Either[E, A], f: => Either[E2, A]): Either[E2, A]
execute second operation only if the first one fails
execute second operation only if the first one fails
- Definition Classes
- Error2 → ApplicativeError2
- def partition[E, A](l: Iterable[Either[E, A]]): Right[Nothing, (List[E], List[A])]
- final def pure[A](a: A): Either[Nothing, A]
- Definition Classes
- BioEither → Applicative2
- Annotations
- @inline()
- def redeem[E, A, E2, B](r: Either[E, A])(err: (E) => Either[E2, B], succ: (A) => Either[E2, B]): Either[E2, B]
- Definition Classes
- Error2
- def redeemPure[E, A, B](r: Either[E, A])(err: (E) => B, succ: (A) => B): Either[Nothing, B]
- Definition Classes
- Error2
- def retryUntil[E, A](r: Either[E, A])(f: (E) => Boolean): Either[E, A]
Retries this effect until its error satisfies the specified predicate.
Retries this effect until its error satisfies the specified predicate.
- Definition Classes
- Error2
- def retryUntilF[E, A](r: Either[E, A])(f: (E) => Either[Nothing, Boolean]): Either[E, A]
Retries this effect until its error satisfies the specified effectful predicate.
Retries this effect until its error satisfies the specified effectful predicate.
- Definition Classes
- Error2
- def retryWhile[E, A](r: Either[E, A])(f: (E) => Boolean): Either[E, A]
Retries this effect while its error satisfies the specified predicate.
Retries this effect while its error satisfies the specified predicate.
- Definition Classes
- Error2
- def retryWhileF[E, A](r: Either[E, A])(f: (E) => Either[Nothing, Boolean]): Either[E, A]
Retries this effect while its error satisfies the specified effectful predicate.
Retries this effect while its error satisfies the specified effectful predicate.
- Definition Classes
- Error2
- def sequence[E, A](l: Iterable[Either[E, A]]): Either[E, List[A]]
- Definition Classes
- Applicative2
- def sequenceAccumErrors[ColR[x] <: IterableOnce[x], ColL[_], E, A](col: ColR[Either[ColL[E], A]])(implicit buildR: Factory[A, ColR[A]], buildL: Factory[E, ColL[E]], iterL: (ColL[E]) => IterableOnce[E]): Either[ColL[E], ColR[A]]
sequence
with error accumulationsequence
with error accumulation- Definition Classes
- ErrorAccumulatingOps2
- def sequenceAccumErrorsNEList[ColR[x] <: IterableOnce[x], E, A](col: ColR[Either[E, A]])(implicit buildR: Factory[A, ColR[A]]): Either[NEList[E], ColR[A]]
sequence
with error accumulationsequence
with error accumulation- Definition Classes
- ErrorAccumulatingOps2
- def sequenceAccumErrors_[ColR[x] <: IterableOnce[x], ColL[_], E, A](col: ColR[Either[ColL[E], A]])(implicit buildL: Factory[E, ColL[E]], iterL: (ColL[E]) => IterableOnce[E]): Either[ColL[E], Unit]
sequence_
with error accumulationsequence_
with error accumulation- Definition Classes
- ErrorAccumulatingOps2
- def sequence_[E](l: Iterable[Either[E, Unit]]): Either[E, Unit]
- Definition Classes
- Applicative2
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def tailRecM[E, A, B](a: A)(f: (A) => Either[E, Either[A, B]]): Either[E, B]
- Definition Classes
- Monad2
- def tap[E, A](r: Either[E, A], f: (A) => Either[E, Unit]): Either[E, A]
- Definition Classes
- Monad2
- def tapBoth[E, A, E1 >: E](r: Either[E, A])(err: (E) => Either[E1, Unit], succ: (A) => Either[E1, Unit]): Either[E1, A]
- Definition Classes
- Error2
- def tapError[E, A, E1 >: E](r: Either[E, A])(f: (E) => Either[E1, Unit]): Either[E1, A]
- Definition Classes
- Error2
- def toString(): String
- Definition Classes
- AnyRef → Any
- def traverse[E, A, B](l: Iterable[A])(f: (A) => Either[E, B]): Either[E, List[B]]
- Definition Classes
- BioEither → Applicative2
- final def traverse[E, A, B](o: Option[A])(f: (A) => Either[E, B]): Either[E, Option[B]]
- Definition Classes
- Applicative2
- Annotations
- @inline()
- def traverseAccumErrors[ColR[x] <: IterableOnce[x], ColL[_], E, A, B](col: ColR[A])(f: (A) => Either[ColL[E], B])(implicit buildR: Factory[B, ColR[B]], buildL: Factory[E, ColL[E]], iterL: (ColL[E]) => IterableOnce[E]): Either[ColL[E], ColR[B]]
traverse
with error accumulationtraverse
with error accumulation- Definition Classes
- ErrorAccumulatingOps2
- def traverseAccumErrors_[ColR[x] <: IterableOnce[x], ColL[_], E, A](col: ColR[A])(f: (A) => Either[ColL[E], Unit])(implicit buildL: Factory[E, ColL[E]], iterL: (ColL[E]) => IterableOnce[E]): Either[ColL[E], Unit]
traverse_
with error accumulationtraverse_
with error accumulation- Definition Classes
- ErrorAccumulatingOps2
- def traverse_[E, A](l: Iterable[A])(f: (A) => Either[E, Unit]): Either[E, Unit]
- Definition Classes
- Applicative2
- def unit: Either[Nothing, Unit]
- Definition Classes
- Applicative2
- final def unless[E, E1](cond: Either[E, Boolean])(ifFalse: => Either[E1, Unit])(implicit ev: <:<[E, E1]): Either[E1, Unit]
- Definition Classes
- Monad2
- Annotations
- @inline()
- final def unless[E](cond: Boolean)(ifFalse: => Either[E, Unit]): Either[E, Unit]
- Definition Classes
- Applicative2
- Annotations
- @inline()
- def void[E, A](r: Either[E, A]): Either[E, Unit]
- Definition Classes
- Functor2
- 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()
- final def when[E, E1](cond: Either[E, Boolean])(ifTrue: => Either[E1, Unit])(implicit ev: <:<[E, E1]): Either[E1, Unit]
- Definition Classes
- Monad2
- Annotations
- @inline()
- final def when[E](cond: Boolean)(ifTrue: => Either[E, Unit]): Either[E, Unit]
- Definition Classes
- Applicative2
- Annotations
- @inline()
- final def widen[E, A, A1](r: Either[E, A])(implicit ev: <:<[A, A1]): Either[E, A1]
- Definition Classes
- Functor2
- Annotations
- @inline()
- final def widenBoth[E, A, E1, A1](r: Either[E, A])(implicit ev: <:<[E, E1], ev2: <:<[A, A1]): Either[E1, A1]
- Definition Classes
- Bifunctor2
- Annotations
- @inline()
- final def widenError[E, A, E1](r: Either[E, A])(implicit ev: <:<[E, E1]): Either[E1, A]
- Definition Classes
- Bifunctor2
- Annotations
- @inline()
- final def withFilter[E, A](r: Either[E, A])(predicate: (A) => Boolean)(implicit filter: WithFilter[E], pos: SourceFilePositionMaterializer): Either[E, A]
for-comprehensions sugar:
for-comprehensions sugar:
for { (1, 2) <- F.pure((2, 1)) } yield ()
Use widenError to for pattern matching with non-Throwable errors:
val f = for { (1, 2) <- F.pure((2, 1)).widenError[Option[Unit]] } yield () // f: F[Option[Unit], Unit] = F.fail(Some(())
- Definition Classes
- Error2
- Annotations
- @inline()