trait Bifunctor[F[_, _]] extends Serializable

A type class of types which give rise to two independent, covariant functors.

Self Type
Bifunctor[F]
Linear Supertypes
Serializable, Serializable, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Bifunctor
  2. Serializable
  3. Serializable
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract 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)
  2. abstract def getClass(): Class[_]
    Definition Classes
    Any

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##(): Int
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def compose[G[_, _]](implicit G0: Bifunctor[G]): Bifunctor[[α, β]F[G[α, β], G[α, β]]]

    The composition of two Bifunctors is itself a Bifunctor

  6. def equals(arg0: Any): Boolean
    Definition Classes
    Any
  7. def hashCode(): Int
    Definition Classes
    Any
  8. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  9. def leftFunctor[X]: Functor[[α$1$]F[α$1$, X]]
  10. def leftMap[A, B, C](fab: F[A, B])(f: (A) ⇒ C): F[C, B]

    apply a function to the "left" functor

  11. 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
  12. def rightFunctor[X]: Functor[[β$0$]F[X, β$0$]]
  13. def toString(): String
    Definition Classes
    Any

Inherited from Serializable

Inherited from Serializable

Inherited from Any

Ungrouped