Interface Bifunctor<A,​B,​BF extends Bifunctor<?,​?,​BF>>

    • Method Detail

      • biMapL

        default <C> Bifunctor<C,​B,​BF> biMapL​(Fn1<? super A,​? extends C> fn)
        Covariantly map over the left parameter.
        Specified by:
        biMapL in interface BoundedBifunctor<A,​B,​java.lang.Object,​java.lang.Object,​BF extends Bifunctor<?,​?,​BF>>
        Type Parameters:
        C - the new left parameter type
        Parameters:
        fn - the mapping function
        Returns:
        a bifunctor over C (the new left parameter) and B (the same right parameter)
      • biMapR

        default <C> Bifunctor<A,​C,​BF> biMapR​(Fn1<? super B,​? extends C> fn)
        Covariantly map over the right parameter. For all bifunctors that are also functors, it should hold that biMapR(f) == fmap(f).
        Specified by:
        biMapR in interface BoundedBifunctor<A,​B,​java.lang.Object,​java.lang.Object,​BF extends Bifunctor<?,​?,​BF>>
        Type Parameters:
        C - the new right parameter type
        Parameters:
        fn - the mapping function
        Returns:
        a bifunctor over A (the same left parameter) and C (the new right parameter)
      • biMap

        <C,​D> Bifunctor<C,​D,​BF> biMap​(Fn1<? super A,​? extends C> lFn,
                                                        Fn1<? super B,​? extends D> rFn)
        Dually map covariantly over both the left and right parameters. This is isomorphic to biMapL(lFn).biMapR(rFn).
        Specified by:
        biMap in interface BoundedBifunctor<A,​B,​java.lang.Object,​java.lang.Object,​BF extends Bifunctor<?,​?,​BF>>
        Type Parameters:
        C - the new left parameter type
        D - the new right parameter type
        Parameters:
        lFn - the left parameter mapping function
        rFn - the right parameter mapping function
        Returns:
        a bifunctor over C (the new left parameter type) and D (the new right parameter type)