sealed abstract
class
ContravariantCoyoneda[F[_], A] extends AnyRef
Type Members
-
abstract
type
I
Abstract Value Members
-
abstract
val
fi: F[I]
-
abstract
val
k: (A) ⇒ I
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: Any): Boolean
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
final
def
contramap[B](f: (B) ⇒ A): Aux[F, B, I]
-
-
-
def
finalize(): Unit
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
final
def
run(implicit F: Contravariant[F]): F[A]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
trans[G[_]](f: ~>[F, G]): Aux[G, A, I]
-
final
def
unlift(implicit F: Contravariant[F]): F[A]
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
Decomposition of
fi.contramap(k)
into its components, as it is frequently convenient to applyk
separately from sorting or whatever process withfi
, even whenB
is unknown, which is very common.This is isomorphic to
F
as long asF
itself is a contravariant functor. The homomorphism fromF[A]
toContravariantCoyoneda[F,A]
exists even whenF
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:https://hackage.haskell.org/package/kan-extensions-4.0.1/docs/Data-Functor-Contravariant-Coyoneda.html