Trait/Object

scalaz

Contravariant

Related Docs: object Contravariant | package scalaz

Permalink

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
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Contravariant
  2. InvariantFunctor
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. trait ContravariantLaw extends InvariantFunctorLaw

    Permalink
  2. trait InvariantFunctorLaw extends AnyRef

    Permalink
    Definition Classes
    InvariantFunctor

Abstract Value Members

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

    Permalink

    Transform A.

    Transform A.

    Note

    contramap(r)(identity) = r

Concrete Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

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

    Permalink

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

  7. def contravariantLaw: ContravariantLaw

    Permalink
  8. val contravariantSyntax: ContravariantSyntax[F]

    Permalink
  9. final def eq(arg0: AnyRef): Boolean

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

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

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

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

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

    Permalink

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

  15. def invariantFunctorLaw: InvariantFunctorLaw

    Permalink
    Definition Classes
    InvariantFunctor
  16. val invariantFunctorSyntax: InvariantFunctorSyntax[F]

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

    Permalink
    Definition Classes
    Any
  18. def narrow[A, B](fa: F[A])(implicit ev: <~<[B, A]): F[B]

    Permalink
  19. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  20. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. final def notifyAll(): Unit

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

    Permalink

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

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

    Permalink
    Definition Classes
    AnyRef
  24. def toString(): String

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

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

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

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

    Permalink

    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
  29. def xmapb[A, B](ma: F[A])(b: Bijection[A, B]): F[B]

    Permalink

    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
  30. def xmapi[A, B](ma: F[A])(iso: Isomorphism.<=>[A, B]): F[B]

    Permalink

    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