Decomposition of fi.contramap(k)
into its components, as it is
frequently convenient to apply k
separately from sorting or
whatever process with fi
, even when B
is unknown, which is
very common.
This is isomorphic to F
as long as F
itself is a contravariant
functor. The homomorphism from F[A]
to
ContravariantCoyoneda[F,A]
exists even when F
is not a
contravariant functor.
See ContravariantCoyonedaUsage.scala
in the scalaz source tree
for an interesting usage demonstration.
As ContravariantCoyoneda(o)(identity).unlift
= o
, further
factoring can occur as follows, for free:
ContravariantCoyoneda(o contramap g)(f).unlift =
ContravariantCoyoneda(o)(g compose f).unlift
- See also
- Companion
- object
Type members
Types
The pivot between fi
and k
, usually existential.
The pivot between fi
and k
, usually existential.
Value members
Concrete methods
Simple function composition. Allows map fusion without touching
the underlying F
.
Simple function composition. Allows map fusion without touching
the underlying F
.
Converts to F[A]
given that F
is a contravariant.
Converts to F[A]
given that F
is a contravariant.