scalaz

Contravariant

trait Contravariant[F[_]] extends InvariantFunctor[F]

Contravariant functors. For example, functions provide a scalaz.Functor in their result type, but a scalaz.Contravariant for each argument type.

Note that the dual of a scalaz.Functor is just a scalaz.Functor itself.

Providing an instance of this is a useful alternative to marking a type parameter with - in Scala.

Self Type
Contravariant[F]
Source
Contravariant.scala
See also

scalaz.Contravariant.ContravariantLaw

Linear Supertypes
InvariantFunctor[F], AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Contravariant
  2. InvariantFunctor
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. trait ContravariantLaw extends InvariantFunctorLaw

  2. trait InvariantFunctorLaw extends AnyRef

    Definition Classes
    InvariantFunctor

Abstract Value Members

  1. abstract def contramap[A, B](r: F[A])(f: (B) ⇒ A): F[B]

    Transform A.

    Transform A.

    Note

    contramap(r)(identity) = r

Concrete Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def compose[G[_]](implicit G0: Contravariant[G]): Functor[[α]F[G[α]]]

    The composition of Contravariant F and G, [x]F[G[x]], is covariant.

  9. def contravariantLaw: ContravariantLaw

  10. val contravariantSyntax: ContravariantSyntax[F]

  11. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  16. def icompose[G[_]](implicit G0: Functor[G]): Contravariant[[α]F[G[α]]]

    The composition of Contravariant F and Functor G, [x]F[G[x]], is contravariant.

  17. def invariantFunctorLaw: InvariantFunctorLaw

    Definition Classes
    InvariantFunctor
  18. val invariantFunctorSyntax: InvariantFunctorSyntax[F]

    Definition Classes
    InvariantFunctor
  19. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  20. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  21. final def notify(): Unit

    Definition Classes
    AnyRef
  22. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  23. def product[G[_]](implicit G0: Contravariant[G]): Contravariant[[α](F[α], G[α])]

    The product of Contravariant F and G, [x](F[x], G[x]]), is contravariant.

  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  25. def toString(): String

    Definition Classes
    AnyRef → Any
  26. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. def xmap[A, B](fa: F[A], f: (A) ⇒ B, g: (B) ⇒ A): F[B]

    Converts ma to a value of type F[B] using the provided functions f and g.

    Converts ma to a value of type F[B] using the provided functions f and g.

    Definition Classes
    ContravariantInvariantFunctor
  30. def xmapb[A, B](ma: F[A])(b: BijectionT.Bijection[A, B]): F[B]

    Converts ma to a value of type F[B] using the provided bijection.

    Converts ma to a value of type F[B] using the provided bijection.

    Definition Classes
    InvariantFunctor
  31. def xmapi[A, B](ma: F[A])(iso: Isomorphism.<=>[A, B]): F[B]

    Converts ma to a value of type F[B] using the provided isomorphism.

    Converts ma to a value of type F[B] using the provided isomorphism.

    Definition Classes
    InvariantFunctor

Inherited from InvariantFunctor[F]

Inherited from AnyRef

Inherited from Any

Ungrouped