final case class IorT[F[_], A, B](value: F[Ior[A, B]]) extends Product with Serializable
- Alphabetic
- By Inheritance
- IorT
- Serializable
- Product
- Equals
- 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
- def ===(that: IorT[F, A, B])(implicit eq: Eq[F[Ior[A, B]]]): Boolean
- def applyAlt[D](ff: IorT[F, A, (B) => D])(implicit F: Apply[F], A: Semigroup[A]): IorT[F, A, D]
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def bimap[C, D](fa: (A) => C, fb: (B) => D)(implicit F: Functor[F]): IorT[F, C, D]
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def collectRight(implicit FA: Alternative[F], FM: FlatMap[F]): F[B]
- def combine(that: IorT[F, A, B])(implicit F: Apply[F], A: Semigroup[A], B: Semigroup[B]): IorT[F, A, B]
- def compare(that: IorT[F, A, B])(implicit ord: Order[F[Ior[A, B]]]): Int
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def exists(f: (B) => Boolean)(implicit F: Functor[F]): F[Boolean]
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def flatMap[AA >: A, D](f: (B) => IorT[F, AA, D])(implicit F: Monad[F], AA: Semigroup[AA]): IorT[F, AA, D]
- def flatMapF[AA >: A, D](f: (B) => F[Ior[AA, D]])(implicit F: Monad[F], AA: Semigroup[AA]): IorT[F, AA, D]
- def fold[C](fa: (A) => C, fb: (B) => C, fab: (A, B) => C)(implicit F: Functor[F]): F[C]
- def foldF[C](fa: (A) => F[C], fb: (B) => F[C], fab: (A, B) => F[C])(implicit F: FlatMap[F]): F[C]
Transform this
IorT[F, A, B]
into aF[C]
.Transform this
IorT[F, A, B]
into aF[C]
.Example:
scala> import cats.data.{Ior, IorT} scala> val iorT: IorT[List, String, Int] = IorT[List, String, Int](List(Ior.Right(123),Ior.Left("abc"), Ior.Both("abc", 123))) scala> iorT.foldF(string => string.split("").toList, int => List(int.toString), (string, int) => string.split("").toList ++ List(int.toString)) val res0: List[String] = List(123, a, b, c, a, b, c, 123)
- def foldLeft[C](c: C)(f: (C, B) => C)(implicit F: Foldable[F]): C
- def foldRight[C](lc: Eval[C])(f: (B, Eval[C]) => Eval[C])(implicit F: Foldable[F]): Eval[C]
- def forall(f: (B) => Boolean)(implicit F: Functor[F]): F[Boolean]
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getOrElse[BB >: B](default: => BB)(implicit F: Functor[F]): F[BB]
- def getOrElseF[BB >: B](default: => F[BB])(implicit F: Monad[F]): F[BB]
- def getOrRaise[E](e: => E)(implicit F: MonadError[F, _ >: E]): F[B]
*
*
Like getOrElseF but accept an error
E
and raise it when the innerIor
isLeft
Equivalent to
getOrElseF(F.raiseError(e)))
Example:
scala> import cats.data.IorT scala> import cats.implicits._ scala> import scala.util.{Success, Failure, Try} scala> val iorT: IorT[Try,String,Int] = IorT.leftT("abc") scala> iorT.getOrRaise(new RuntimeException("ERROR!")) res0: Try[Int] = Failure(java.lang.RuntimeException: ERROR!)
- def isBoth(implicit F: Functor[F]): F[Boolean]
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isLeft(implicit F: Functor[F]): F[Boolean]
- def isRight(implicit F: Functor[F]): F[Boolean]
- def leftFlatMap[BB >: B, C](f: (A) => IorT[F, C, BB])(implicit F: Monad[F], BB: Semigroup[BB]): IorT[F, C, BB]
- def leftMap[C](f: (A) => C)(implicit F: Functor[F]): IorT[F, C, B]
- def leftSemiflatMap[C](f: (A) => F[C])(implicit F: Monad[F]): IorT[F, C, B]
- def map[D](f: (B) => D)(implicit F: Functor[F]): IorT[F, A, D]
- def mapK[G[_]](f: ~>[F, G]): IorT[G, A, B]
- def merge[AA >: A](implicit ev: <:<[B, AA], F: Functor[F], AA: Semigroup[AA]): F[AA]
- 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 productElementNames: Iterator[String]
- Definition Classes
- Product
- def semiflatMap[D](f: (B) => F[D])(implicit F: Monad[F]): IorT[F, A, D]
- def show(implicit show: Show[F[Ior[A, B]]]): String
- def subflatMap[AA >: A, D](f: (B) => Ior[AA, D])(implicit F: Functor[F], AA: Semigroup[AA]): IorT[F, AA, D]
- def swap(implicit F: Functor[F]): IorT[F, B, A]
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def to[G[_]](implicit F: Functor[F], G: Alternative[G]): F[G[B]]
- def toEither(implicit F: Functor[F]): EitherT[F, A, B]
- def toNested: Nested[F, [β$0$]Ior[A, β$0$], B]
- def toNestedValidated(implicit F: Functor[F]): Nested[F, [β$2$]Validated[A, β$2$], B]
- def toOption(implicit F: Functor[F]): OptionT[F, B]
- def toValidated(implicit F: Functor[F]): F[Validated[A, B]]
- def transform[C, D](f: (Ior[A, B]) => Ior[C, D])(implicit F: Functor[F]): IorT[F, C, D]
- def traverse[G[_], D](f: (B) => G[D])(implicit traverseF: Traverse[F], applicativeG: Applicative[G]): G[IorT[F, A, D]]
- val value: F[Ior[A, B]]
- def valueOr[BB >: B](f: (A) => BB)(implicit F: Functor[F], BB: Semigroup[BB]): F[BB]
- 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()