Class LeftAny<L,R>
- java.lang.Object
-
- com.jnape.palatable.lambda.semigroup.builtin.LeftAny<L,R>
-
- Type Parameters:
L- The left parameter typeR- The right parameter type
- All Implemented Interfaces:
Fn1<Semigroup<L>,Fn1<Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>>,Fn2<Semigroup<L>,Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>,Fn3<Semigroup<L>,Either<L,R>,Either<L,R>,Either<L,R>>,SemigroupFactory<Semigroup<L>,Either<L,R>>,Applicative<Fn1<Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>,Fn1<Semigroup<L>,?>>,Cartesian<Semigroup<L>,Fn1<Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>,Fn1<?,?>>,Cocartesian<Semigroup<L>,Fn1<Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>,Fn1<?,?>>,Contravariant<Semigroup<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<Semigroup<L>,?>>,Profunctor<Semigroup<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<Semigroup<L>,?>>,MonadReader<Semigroup<L>,Fn1<Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>,Fn1<Semigroup<L>,?>>,MonadRec<Fn1<Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>,Fn1<Semigroup<L>,?>>,MonadWriter<Semigroup<L>,Fn1<Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>,Fn1<Semigroup<L>,?>>
public final class LeftAny<L,R> extends java.lang.Object implements SemigroupFactory<Semigroup<L>,Either<L,R>>
ASemigroupinstance formed byand a semigroup overEither<L,R>L. The application to twoEithervalues is left-biased, such that for a givenEitherxandy:- if both
xandyare left values, the result is the application of the x and y values in terms of the provided semigroup, wrapped inEither.left(L) - if only
xis a left value, the result isx - if only
yis a left value, the result isy - if neither
xnoryare left values, the result isy
-
-
Constructor Summary
Constructors Modifier Constructor Description privateLeftAny()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Semigroup<Either<L,R>>checkedApply(Semigroup<L> lSemigroup)Invoke this function with the given argument, potentially throwing anyThrowable.static <L,R>
LeftAny<L,R>leftAny()static <L,R>
Semigroup<Either<L,R>>leftAny(Semigroup<L> lSemigroup)static <L,R>
Fn1<Either<L,R>,Either<L,R>>leftAny(Semigroup<L> lSemigroup, Either<L,R> x)static <L,R>
Either<L,R>leftAny(Semigroup<L> lSemigroup, 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, apply, checkedApply, compose, contraMap, diMapL, discardR, flip, uncurry, widen
-
Methods inherited from interface com.jnape.palatable.lambda.functions.specialized.SemigroupFactory
apply, checkedApply
-
-
-
-
Field Detail
-
INSTANCE
private static final LeftAny<?,?> INSTANCE
-
-
Method Detail
-
checkedApply
public Semigroup<Either<L,R>> checkedApply(Semigroup<L> lSemigroup)
Description copied from interface:Fn2Invoke this function with the given argument, potentially throwing anyThrowable.- Specified by:
checkedApplyin interfaceFn1<L,R>- Specified by:
checkedApplyin interfaceFn2<Semigroup<L>,Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>- Specified by:
checkedApplyin interfaceSemigroupFactory<L,R>- Parameters:
lSemigroup- the argument- Returns:
- the result of the function application
-
leftAny
public static <L,R> LeftAny<L,R> leftAny()
-
leftAny
public static <L,R> Fn1<Either<L,R>,Either<L,R>> leftAny(Semigroup<L> lSemigroup, Either<L,R> x)
-
-