arrow-core-data / arrow.typeclasses / Bifunctor

Bifunctor

interface Bifunctor<F>

Bifunctor has the same properties of Functor, but acting onto two types, instead of one.

It can be used to map both of its inside types.

Functions

bimap Maps both types of Kind2.abstract fun <A, B, C, D> Kind2<F, A, B>.bimap(fl: (A) -> C, fr: (B) -> D): Kind2<F, C, D>
leftFunctor Returns a Functor acting on the type of the left side.open fun <X> leftFunctor(): Functor<Conested<F, X>>
leftWiden open fun <AA, B, A : AA> Kind2<F, A, B>.leftWiden(): Kind2<F, AA, B>
lift Lifts two functions to the Bifunctor type.open fun <A, B, C, D> lift(fl: (A) -> C, fr: (B) -> D): (Kind2<F, A, B>) -> Kind2<F, C, D>
mapLeft Map the left side type of Kind2open fun <A, B, C> Kind2<F, A, B>.mapLeft(f: (A) -> C): Kind2<F, C, B>
rightFunctor Returns a Functor acting on the type of the right side.open fun <X> rightFunctor(): Functor<Kind<F, X>>

Inheritors

Bicrosswalk interface Bicrosswalk<T> : Bifunctor<T>, Bifoldable<T>
Bitraverse interface Bitraverse<F> : Bifunctor<F>, Bifoldable<F>

Type Class Hierarchy

Do you like Arrow?

Arrow Org
<