Packages

  • package root
    Definition Classes
    root
  • package cats

    The cats root package contains all the trait signatures of most Scala type classes.

    The cats root package contains all the trait signatures of most Scala type classes.

    Cats type classes are implemented using the approach from the Type classes as objects and implicits article.

    For each type class, cats provides three pieces: - Its signature: a trait that is polymorphic on a type parameter. Type class traits inherit from other type classes to indicate that any implementation of the lower type class (e.g. Applicative) can also serve as an instance for the higuer type class (e.g. Functor). - Type class 'instances, which are classes and objects that implement one or more type class signatures for some specific types. Type class instances for several data types from the Java or Scala standard libraries are declared in the subpackage cats.instances. - Syntax extensions, each of which provides the methods of the type class defines as extension methods (which in Scala 2 are encoded as implicit classes) for values of any type F; given that an instance of the type class for the receiver type (this) is in the implicit scope. Symtax extensions are declared in the cats.syntax package. - A set of laws, that are also generic on the type of the class, and are only defined on the operations of the type class. The purpose of these laws is to declare some algebraic relations (equations) between Scala expressions involving the operations of the type class, and test (but not verify) that implemented instances satisfy those equations. Laws are defined in the cats-laws package.

    Although most of cats type classes are declared in this package, some are declared in other packages: - type classes that operate on base types (kind *), and their implementations for standard library types, are contained in cats.kernel, which is a different SBT project. However, they are re-exported from this package. - type classes of kind F[_, _], such as cats.arrow.Profunctor" or cats.arrow.Arrow, which are relevant for Functional Reactive Programming or optics, are declared in the cats.arrow package. - Also, those type classes that abstract over (pure or impure) functional runtime effects are declared in the cats-effect library. - Some type classes for which no laws can be provided are left out of the main road, in a small and dirty alley. These are the alleycats.

    Definition Classes
    root
  • package data
    Definition Classes
    cats
  • AndThen
  • AppFunc
  • Binested
  • BinestedBifoldable
  • BinestedBitraverse
  • BinestedInstances
  • Chain
  • Cokleisli
  • Const
  • Cont
  • ContT
  • EitherK
  • EitherT
  • Func
  • IdT
  • IndexedReaderWriterStateT
  • IndexedState
  • IndexedStateT
  • Ior
  • IorT
  • Kleisli
  • Nested
  • NonEmptyChainOps
  • NonEmptyList
  • NonEmptyMapOps
  • NonEmptySetOps
  • NonEmptyVector
  • OneAnd
  • Op
  • OptionT
  • Reader
  • ReaderWriterState
  • ReaderWriterStateT
  • RepresentableStore
  • State
  • StateT
  • Store
  • Tuple2K
  • Validated
  • Writer
  • WriterT
  • ZipList
  • ZipStream
  • ZipVector
c

cats.data

BinestedBitraverse

sealed abstract class BinestedBitraverse[F[_, _], G[_], H[_]] extends BinestedBifoldable[F, G, H] with Bitraverse[[δ$14$, ε$15$]Binested[F, G, H, δ$14$, ε$15$]]

Linear Supertypes
Bitraverse[[δ$14$, ε$15$]Binested[F, G, H, δ$14$, ε$15$]], Bifunctor[[δ$14$, ε$15$]Binested[F, G, H, δ$14$, ε$15$]], BinestedBifoldable[F, G, H], Bifoldable[[δ$12$, ε$13$]Binested[F, G, H, δ$12$, ε$13$]], Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BinestedBitraverse
  2. Bitraverse
  3. Bifunctor
  4. BinestedBifoldable
  5. Bifoldable
  6. Serializable
  7. Serializable
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. implicit abstract def F: Bitraverse[F]
    Definition Classes
    BinestedBitraverseBinestedBifoldable
  2. implicit abstract def G: Traverse[G]
    Definition Classes
    BinestedBitraverseBinestedBifoldable
  3. implicit abstract def H: Traverse[H]
    Definition Classes
    BinestedBitraverseBinestedBifoldable

Concrete 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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def bifold[A, B](fab: Binested[F, G, H, A, B])(implicit A: Monoid[A], B: Monoid[B]): (A, B)
    Definition Classes
    Bifoldable
  6. def bifoldLeft[A, B, C](fab: Binested[F, G, H, A, B], c: C)(f: (C, A) ⇒ C, g: (C, B) ⇒ C): C

    Collapse the structure with a left-associative function

    Collapse the structure with a left-associative function

    Definition Classes
    BinestedBifoldableBifoldable
  7. def bifoldMap[A, B, C](fab: Binested[F, G, H, A, B])(f: (A) ⇒ C, g: (B) ⇒ C)(implicit C: Monoid[C]): C

    Collapse the structure by mapping each element to an element of a type that has a cats.Monoid

    Collapse the structure by mapping each element to an element of a type that has a cats.Monoid

    Definition Classes
    Bifoldable
  8. def bifoldRight[A, B, C](fab: Binested[F, G, H, A, B], c: Eval[C])(f: (A, Eval[C]) ⇒ Eval[C], g: (B, Eval[C]) ⇒ Eval[C]): Eval[C]

    Collapse the structure with a right-associative function

    Collapse the structure with a right-associative function

    Definition Classes
    BinestedBifoldableBifoldable
  9. def bimap[A, B, C, D](fab: Binested[F, G, H, A, B])(f: (A) ⇒ C, g: (B) ⇒ D): Binested[F, G, H, C, D]

    The quintessential method of the Bifunctor trait, it applies a function to each "side" of the bifunctor.

    The quintessential method of the Bifunctor trait, it applies a function to each "side" of the bifunctor.

    Example:

    scala> import cats.implicits._
    
    scala> val x: (List[String], Int) = (List("foo", "bar"), 3)
    scala> x.bimap(_.headOption, _.toLong + 1)
    res0: (Option[String], Long) = (Some(foo),4)
    Definition Classes
    BitraverseBifunctor
  10. def bisequence[G[_], A, B](fab: Binested[F, G, H, G[A], G[B]])(implicit arg0: Applicative[G]): G[Binested[F, G, H, A, B]]

    Invert the structure from F[G[A], G[B]] to G[F[A, B]].

    Invert the structure from F[G[A], G[B]] to G[F[A, B]].

    Example:

    scala> import cats.implicits._
    
    scala> val rightSome: Either[Option[String], Option[Int]] = Either.right(Some(3))
    scala> rightSome.bisequence
    res0: Option[Either[String, Int]] = Some(Right(3))
    
    scala> val rightNone: Either[Option[String], Option[Int]] = Either.right(None)
    scala> rightNone.bisequence
    res1: Option[Either[String, Int]] = None
    
    scala> val leftSome: Either[Option[String], Option[Int]] = Either.left(Some("foo"))
    scala> leftSome.bisequence
    res2: Option[Either[String, Int]] = Some(Left(foo))
    
    scala> val leftNone: Either[Option[String], Option[Int]] = Either.left(None)
    scala> leftNone.bisequence
    res3: Option[Either[String, Int]] = None
    Definition Classes
    Bitraverse
  11. def bitraverse[I[_], A, B, C, D](fab: Binested[F, G, H, A, B])(f: (A) ⇒ I[C], g: (B) ⇒ I[D])(implicit I: Applicative[I]): I[Binested[F, G, H, C, D]]

    Traverse each side of the structure with the given functions.

    Traverse each side of the structure with the given functions.

    Example:

    scala> import cats.implicits._
    
    scala> def parseInt(s: String): Option[Int] = Either.catchOnly[NumberFormatException](s.toInt).toOption
    
    scala> ("1", "2").bitraverse(parseInt, parseInt)
    res0: Option[(Int, Int)] = Some((1,2))
    
    scala> ("1", "two").bitraverse(parseInt, parseInt)
    res1: Option[(Int, Int)] = None
    Definition Classes
    BinestedBitraverseBitraverse
  12. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  13. def compose[G[_, _]](implicit ev: Bitraverse[G]): Bitraverse[[α, β]Binested[F, G, H, G[α, β], G[α, β]]]

    If F and G are both cats.Bitraverse then so is their composition F[G[_, _], G[_, _]]

    If F and G are both cats.Bitraverse then so is their composition F[G[_, _], G[_, _]]

    Definition Classes
    Bitraverse
  14. def compose[G[_, _]](implicit G0: Bifunctor[G]): Bifunctor[[α, β]Binested[F, G, H, G[α, β], G[α, β]]]

    The composition of two Bifunctors is itself a Bifunctor

    The composition of two Bifunctors is itself a Bifunctor

    Definition Classes
    Bifunctor
  15. def compose[G[_, _]](implicit ev: Bifoldable[G]): Bifoldable[[α, β]Binested[F, G, H, G[α, β], G[α, β]]]
    Definition Classes
    Bifoldable
  16. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  18. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  20. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  21. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  22. def leftFunctor[X]: Functor[[α$1$]Binested[F, G, H, α$1$, X]]
    Definition Classes
    Bifunctor
  23. def leftMap[A, B, C](fab: Binested[F, G, H, A, B])(f: (A) ⇒ C): Binested[F, G, H, C, B]

    apply a function to the "left" functor

    apply a function to the "left" functor

    Definition Classes
    Bifunctor
  24. def leftSequence[G[_], A, B](fgab: Binested[F, G, H, G[A], B])(implicit G: Applicative[G]): G[Binested[F, G, H, A, B]]

    Sequence the left side of the structure.

    Sequence the left side of the structure. For the right side, use the standard sequence from cats.Traverse.

    Example:

    scala> import cats.implicits._
    
    scala> val optionalErrorRight: Either[Option[String], Int] = Either.right(123)
    scala> optionalErrorRight.leftSequence
    res1: Option[Either[String, Int]] = Some(Right(123))
    
    scala> val optionalErrorLeftSome: Either[Option[String], Int] = Either.left(Some("something went wrong"))
    scala> optionalErrorLeftSome.leftSequence
    res2: Option[Either[String, Int]] = Some(Left(something went wrong))
    
    scala> val optionalErrorLeftNone: Either[Option[String], Int] = Either.left(None)
    scala> optionalErrorLeftNone.leftSequence
    res3: Option[Either[String,Int]] = None
    Definition Classes
    Bitraverse
    Annotations
    @noop()
  25. def leftTraverse[G[_], A, B, C](fab: Binested[F, G, H, A, B])(f: (A) ⇒ G[C])(implicit G: Applicative[G]): G[Binested[F, G, H, C, B]]

    Traverse over the left side of the structure.

    Traverse over the left side of the structure. For the right side, use the standard traverse from cats.Traverse.

    Example:

    scala> import cats.implicits._
    
    scala> val intAndString: (Int, String) = (7, "test")
    
    scala> Bitraverse[Tuple2].leftTraverse(intAndString)(i => Option(i).filter(_ > 5))
    res1: Option[(Int, String)] = Some((7,test))
    
    scala> Bitraverse[Tuple2].leftTraverse(intAndString)(i => Option(i).filter(_ < 5))
    res2: Option[(Int, String)] = None
    Definition Classes
    Bitraverse
    Annotations
    @noop()
  26. def leftWiden[A, B, AA >: A](fab: Binested[F, G, H, A, B]): Binested[F, G, H, AA, B]

    Widens A into a supertype AA.

    Widens A into a supertype AA. Example:

    scala> import cats.implicits._
    scala> sealed trait Foo
    scala> case object Bar extends Foo
    scala> val x1: Either[Bar.type, Int] = Either.left(Bar)
    scala> val x2: Either[Foo, Int] = x1.leftWiden
    Definition Classes
    Bifunctor
  27. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  28. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  29. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  30. def rightFunctor[X]: Functor[[β$0$]Binested[F, G, H, X, β$0$]]
    Definition Classes
    Bifunctor
  31. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  32. def toString(): String
    Definition Classes
    AnyRef → Any
  33. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from Bitraverse[[δ$14$, ε$15$]Binested[F, G, H, δ$14$, ε$15$]]

Inherited from Bifunctor[[δ$14$, ε$15$]Binested[F, G, H, δ$14$, ε$15$]]

Inherited from BinestedBifoldable[F, G, H]

Inherited from Bifoldable[[δ$12$, ε$13$]Binested[F, G, H, δ$12$, ε$13$]]

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped