Packages

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

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

Self Type
Bifunctor[F]
Annotations
@implicitNotFound( ... ) @typeclass( ... , ... )
Source
Bifunctor.scala
Linear Supertypes
Serializable, Serializable, AnyRef, Any
Known Subclasses
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Bifunctor
  2. Serializable
  3. Serializable
  4. AnyRef
  5. 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)

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 clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @IntrinsicCandidate()
  6. def compose[G[_, _]](implicit G0: Bifunctor[G]): Bifunctor[[α, β]F[G[α, β], G[α, β]]]

    The composition of two Bifunctors is itself a Bifunctor

  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. def leftFunctor[X]: Functor[[α$1$]F[α$1$, X]]
  13. def leftMap[A, B, C](fab: F[A, B])(f: (A) ⇒ C): F[C, B]

    apply a function to the "left" functor

  14. 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
  15. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  17. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  18. def rightFunctor[X]: Functor[[β$0$]F[X, β$0$]]
  19. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  20. def toString(): String
    Definition Classes
    AnyRef → Any
  21. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  23. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped