Class LeftAll<L,R>
- java.lang.Object
-
- com.jnape.palatable.lambda.monoid.builtin.LeftAll<L,R>
-
- Type Parameters:
L- The left parameter typeR- The right parameter type
- All Implemented Interfaces:
Fn1<Monoid<L>,Fn1<Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>>,Fn2<Monoid<L>,Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>,Fn3<Monoid<L>,Either<L,R>,Either<L,R>,Either<L,R>>,MonoidFactory<Monoid<L>,Either<L,R>>,SemigroupFactory<Monoid<L>,Either<L,R>>,Applicative<Fn1<Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>,Fn1<Monoid<L>,?>>,Cartesian<Monoid<L>,Fn1<Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>,Fn1<?,?>>,Cocartesian<Monoid<L>,Fn1<Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>,Fn1<?,?>>,Contravariant<Monoid<L>,Profunctor<?,Fn1<Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>,Fn1<?,?>>>,Functor<Fn1<Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>,Fn1<Monoid<L>,?>>,Profunctor<Monoid<L>,Fn1<Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>,Fn1<?,?>>,Monad<Fn1<Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>,Fn1<Monoid<L>,?>>,MonadReader<Monoid<L>,Fn1<Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>,Fn1<Monoid<L>,?>>,MonadRec<Fn1<Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>,Fn1<Monoid<L>,?>>,MonadWriter<Monoid<L>,Fn1<Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>,Fn1<Monoid<L>,?>>
public final class LeftAll<L,R> extends java.lang.Object implements MonoidFactory<Monoid<L>,Either<L,R>>
AMonoidinstance formed byand a monoid overEither<L,R>L. The application to twoEithervalues short-circuits on right values, such that for a givenEitherxandy:- if
xis aRightvalue, the result isx - if
yis aRightvalue, the result isy - if both
xandyare left values, the result is the application of the x and y values in terms of the provided monoid, wrapped inEither.left(L)
-
-
Constructor Summary
Constructors Modifier Constructor Description privateLeftAll()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Monoid<Either<L,R>>checkedApply(Monoid<L> lMonoid)Invoke this function with the given argument, potentially throwing anyThrowable.static <L,R>
LeftAll<L,R>leftAll()static <L,R>
Monoid<Either<L,R>>leftAll(Monoid<L> lMonoid)static <L,R>
Fn1<Either<L,R>,Either<L,R>>leftAll(Monoid<L> lMonoid, Either<L,R> x)static <L,R>
Either<L,R>leftAll(Monoid<L> lMonoid, Either<L,R> x, Either<L,R> y)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.jnape.palatable.lambda.functions.Fn1
andThen, carry, cartesian, censor, choose, cocartesian, diMap, diMapR, discardL, flatMap, fmap, lazyZip, listens, local, pure, self, thunk, toFunction, trampolineM, zip, zip
-
Methods inherited from interface com.jnape.palatable.lambda.functions.Fn2
toBiFunction
-
Methods inherited from interface com.jnape.palatable.lambda.functions.Fn3
apply, checkedApply, compose, contraMap, diMapL, discardR, flip, uncurry, widen
-
Methods inherited from interface com.jnape.palatable.lambda.functions.specialized.MonoidFactory
apply, apply
-
Methods inherited from interface com.jnape.palatable.lambda.functions.specialized.SemigroupFactory
checkedApply
-
-
-
-
Field Detail
-
INSTANCE
private static final LeftAll<?,?> INSTANCE
-
-
Method Detail
-
checkedApply
public Monoid<Either<L,R>> checkedApply(Monoid<L> lMonoid)
Description copied from interface:Fn2Invoke this function with the given argument, potentially throwing anyThrowable.- Specified by:
checkedApplyin interfaceFn1<L,R>- Specified by:
checkedApplyin interfaceFn2<Monoid<L>,Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>- Specified by:
checkedApplyin interfaceMonoidFactory<L,R>- Specified by:
checkedApplyin interfaceSemigroupFactory<L,R>- Parameters:
lMonoid- the argument- Returns:
- the result of the function application
-
leftAll
public static <L,R> LeftAll<L,R> leftAll()
-
leftAll
public static <L,R> Fn1<Either<L,R>,Either<L,R>> leftAll(Monoid<L> lMonoid, Either<L,R> x)
-
-