final case class IdT[F[_], A](value: F[A]) extends Product with Serializable
- Alphabetic
- By Inheritance
- IdT
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new IdT(value: F[A])
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 ap[B](f: IdT[F, (A) => B])(implicit F: Apply[F]): IdT[F, B]
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- 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 finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def flatMap[B](f: (A) => IdT[F, B])(implicit F: FlatMap[F]): IdT[F, B]
Example:
Example:
scala> import cats.data.IdT scala> val idT: IdT[List, Int] = IdT(List(1, 2, 3)) scala> idT.flatMap(x => IdT(List(x + 1))) res0: IdT[List, Int] = IdT(List(2, 3, 4))
- def flatMapF[B](f: (A) => F[B])(implicit F: FlatMap[F]): IdT[F, B]
Example:
Example:
scala> import cats.data.IdT scala> val idT: IdT[List, Int] = IdT(List(1, 2, 3)) scala> idT.flatMapF(x => List(Option(x).filter(_ % 2 == 0))) res0: IdT[List, Option[Int]] = IdT(List(None, Some(2), None))
- def foldLeft[B](b: B)(f: (B, A) => B)(implicit F: Foldable[F]): B
Example:
Example:
scala> import cats.data.IdT scala> val idT: IdT[List, Int] = IdT(List(1, 2, 3)) scala> idT.foldLeft(0)((acc, x) => acc + x) res0: Int = 6
- def foldRight[B](lb: Eval[B])(f: (A, Eval[B]) => Eval[B])(implicit F: Foldable[F]): Eval[B]
Example:
Example:
scala> import cats.data.IdT scala> import cats.Eval scala> val idT: IdT[List, Int] = IdT(List(1, 2, 3)) scala> idT.foldRight(Eval.Zero)((x, acc) => Eval.later(x + acc.value)).value res0: Int = 6
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def map[B](f: (A) => B)(implicit F: Functor[F]): IdT[F, B]
Example:
Example:
scala> import cats.data.IdT scala> val idT: IdT[List, Int] = IdT(List(1, 2, 3)) scala> idT.map(_ + 1) res0: IdT[List, Int] = IdT(List(2, 3, 4))
- def mapK[G[_]](f: ~>[F, G]): IdT[G, A]
Modify the context
F
using transformationf
.Modify the context
F
using transformationf
.Example:
scala> import cats.~> scala> import cats.data.IdT scala> val vectorToList: Vector ~> List = new ~>[Vector, List] { override def apply[A](v: Vector[A]): List[A] = v.toList } scala> val idT: IdT[Vector, Int] = IdT(Vector(1, 2, 3)) scala> idT.mapK[List](vectorToList) res0: IdT[List, Int] = IdT(List(1, 2, 3))
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def nonEmptyTraverse[G[_], B](f: (A) => G[B])(implicit F: NonEmptyTraverse[F], G: Apply[G]): G[IdT[F, B]]
- 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 reduceLeftTo[B](f: (A) => B)(g: (B, A) => B)(implicit F: Reducible[F]): B
- def reduceRightTo[B](f: (A) => B)(g: (A, Eval[B]) => Eval[B])(implicit F: Reducible[F]): Eval[B]
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def traverse[G[_], B](f: (A) => G[B])(implicit F: Traverse[F], G: Applicative[G]): G[IdT[F, B]]
Example:
Example:
scala> import cats.data.IdT scala> val idT: IdT[List, Int] = IdT(List(1, 2, 3)) scala> idT.traverse[Option, Int](x => Option(x + 1)) res0: Option[IdT[List, Int]] = Some(IdT(List(2, 3, 4)))
- val value: F[A]
- 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()