Poll
Value members
Inherited methods
def andThen[H <: ([_$4] =>> Any)](f: FunctionK[G, H]): FunctionK[F, H]
Composes two instances of FunctionK into a new FunctionK with this
transformation applied first.
transformation applied first.
- Inhertied from
- FunctionK
def compose[E <: ([_$3] =>> Any)](f: FunctionK[E, F]): FunctionK[E, G]
Composes two instances of FunctionK into a new FunctionK with this
transformation applied last.
transformation applied last.
- Inhertied from
- FunctionK
def or[H <: ([_$5] =>> Any)](h: FunctionK[H, G]): FunctionK[[_$6] =>> EitherK[F, H, _$6], G]
Composes two instances of FunctionK into a new FunctionK that transforms
a cats.data.EitherK to a single functor.
a cats.data.EitherK to a single functor.
This transformation will be used to transform left
F
values whileh
will be used to transform right H
values.- Inhertied from
- FunctionK
def and[H <: ([_$8] =>> Any)](h: FunctionK[F, H]): FunctionK[F, [_$9] =>> Tuple2K[G, H, _$9]]
Composes two instances of
one single functor to a cats.data.Tuple2K of two functors.
FunctionK
into a new FunctionK
that transformsone single functor to a cats.data.Tuple2K of two functors.
{{{
scala> import cats.arrow.FunctionK
scala> val list2option = λFunctionK[List, Option]
scala> val list2vector = λFunctionK[List, Vector]
scala> val optionAndVector = list2option and list2vector
scala> optionAndVector(List(1,2,3))
res0: cats.data.Tuple2K[Option,Vector,Int] = Tuple2K(Some(1),Vector(1, 2, 3))
}}}
scala> import cats.arrow.FunctionK
scala> val list2option = λFunctionK[List, Option]
scala> val list2vector = λFunctionK[List, Vector]
scala> val optionAndVector = list2option and list2vector
scala> optionAndVector(List(1,2,3))
res0: cats.data.Tuple2K[Option,Vector,Int] = Tuple2K(Some(1),Vector(1, 2, 3))
}}}
- Inhertied from
- FunctionK
def apply[A](fa: F[A]): G[A]
Applies this functor transformation from
F
to G
- Inhertied from
- FunctionK