trait Bitraverse[F[_, _]] extends Bifoldable[F] with Bifunctor[F] with Serializable

A type class abstracting over types that give rise to two independent cats.Traverses.

Self Type
Bitraverse[F]
Source
Bitraverse.scala
Linear Supertypes
Bifunctor[F], Bifoldable[F], Serializable, Serializable, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Bitraverse
  2. Bifunctor
  3. Bifoldable
  4. Serializable
  5. Serializable
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def bifoldLeft[A, B, C](fab: F[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
    Bifoldable
  2. abstract def bifoldRight[A, B, C](fab: F[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
    Bifoldable
  3. abstract def bitraverse[G[_], A, B, C, D](fab: F[A, B])(f: (A) ⇒ G[C], g: (B) ⇒ G[D])(implicit arg0: Applicative[G]): G[F[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

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 bifoldMap[A, B, C](fab: F[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
  6. def bimap[A, B, C, D](fab: F[A, B])(f: (A) ⇒ C, g: (B) ⇒ D): F[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
  7. def bisequence[G[_], A, B](fab: F[G[A], G[B]])(implicit arg0: Applicative[G]): G[F[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
  8. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  9. def compose[G[_, _]](implicit ev: Bitraverse[G]): Bitraverse[[α, β]F[G[α, β], G[α, β]]]

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

  10. def compose[G[_, _]](implicit G0: Bifunctor[G]): Bifunctor[[α, β]F[G[α, β], G[α, β]]]

    The composition of two Bifunctors is itself a Bifunctor

    The composition of two Bifunctors is itself a Bifunctor

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

    apply a function to the "left" functor

    apply a function to the "left" functor

    Definition Classes
    Bifunctor
  20. def leftWiden[A, B, AA >: A](fab: F[A, B]): F[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
  21. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  22. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  23. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  24. def rightFunctor[X]: Functor[[β$0$]F[X, β$0$]]
    Definition Classes
    Bifunctor
  25. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  26. def toString(): String
    Definition Classes
    AnyRef → Any
  27. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from Bifunctor[F]

Inherited from Bifoldable[F]

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped