Packages

final case class IdT[F[_], A](value: F[A]) extends Product with Serializable

IdT[F[_], A] is the identity monad transformer.

Source
IdT.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. IdT
  2. Serializable
  3. Product
  4. Equals
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new IdT(value: F[A])

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def ap[B](f: IdT[F, (A) => B])(implicit F: Apply[F]): IdT[F, B]
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  9. 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))
  10. 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))
  11. 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
  12. 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
  13. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. 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))
  16. def mapK[G[_]](f: ~>[F, G]): IdT[G, A]

    Modify the context F using transformation f.

    Modify the context F using transformation f.

    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))
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. def nonEmptyTraverse[G[_], B](f: (A) => G[B])(implicit F: NonEmptyTraverse[F], G: Apply[G]): G[IdT[F, B]]
  19. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  21. def productElementNames: Iterator[String]
    Definition Classes
    Product
  22. def reduceLeftTo[B](f: (A) => B)(g: (B, A) => B)(implicit F: Reducible[F]): B
  23. def reduceRightTo[B](f: (A) => B)(g: (A, Eval[B]) => Eval[B])(implicit F: Reducible[F]): Eval[B]
  24. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  25. 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)))
  26. val value: F[A]
  27. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  28. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  29. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped