abstract
class
InjectK[F[_], G[_]] extends AnyRef
Instance Constructors
-
new
InjectK()
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: Any): Boolean
-
final
def
apply[A](fa: F[A]): G[A]
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
-
-
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
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
unapply[A](ga: G[A]): Option[F[A]]
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
InjectK is a type class providing an injection from type constructor
F
into type constructorG
. An injection is a functor transformationinj
which does not destroy any information: for everyga: G[A]
there is at most onefa: F[A]
such thatinj(fa) = ga
.Because of this all injections admit partial inverses
prj
which pair a valuega: G[A]
back with a single valuefa: F[A]
.The behavior of the default instances for the InjectK type class are described thoroughly in "Data types a la carte" (Swierstra 2008).
Prior to cats 1.0, InjectK was known as Inject.
Inject for injection for
Either
http://www.staff.science.uu.nl/~swier004/publications/2008-jfp.pdf