Class RightAll<L,R>
- java.lang.Object
-
- com.jnape.palatable.lambda.semigroup.builtin.RightAll<L,R>
-
- Type Parameters:
L
- The left parameter typeR
- The right parameter type
- All Implemented Interfaces:
Fn1<Semigroup<R>,Fn1<Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>>
,Fn2<Semigroup<R>,Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>
,Fn3<Semigroup<R>,Either<L,R>,Either<L,R>,Either<L,R>>
,SemigroupFactory<Semigroup<R>,Either<L,R>>
,Applicative<Fn1<Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>,Fn1<Semigroup<R>,?>>
,Cartesian<Semigroup<R>,Fn1<Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>,Fn1<?,?>>
,Cocartesian<Semigroup<R>,Fn1<Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>,Fn1<?,?>>
,Contravariant<Semigroup<R>,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<R>,?>>
,Profunctor<Semigroup<R>,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<R>,?>>
,MonadReader<Semigroup<R>,Fn1<Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>,Fn1<Semigroup<R>,?>>
,MonadRec<Fn1<Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>,Fn1<Semigroup<R>,?>>
,MonadWriter<Semigroup<R>,Fn1<Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>,Fn1<Semigroup<R>,?>>
public final class RightAll<L,R> extends java.lang.Object implements SemigroupFactory<Semigroup<R>,Either<L,R>>
ASemigroup
instance formed by
and a semigroup overEither
<L,R>R
. The application to twoEither
values is left-biased, such that for a givenEither
x
andy
:- if
x
is aLeft
value, the result isx
- if
y
is aLeft
value, the result isy
- if both
x
andy
are right values, the result is the application of the x and y values in terms of the provided semigroup, wrapped inEither.right(R)
-
-
Constructor Summary
Constructors Modifier Constructor Description private
RightAll()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Semigroup<Either<L,R>>
checkedApply(Semigroup<R> rSemigroup)
Invoke this function with the given argument, potentially throwing anyThrowable
.static <L,R>
RightAll<L,R>rightAll()
static <L,R>
Semigroup<Either<L,R>>rightAll(Semigroup<R> rSemigroup)
static <L,R>
Fn1<Either<L,R>,Either<L,R>>rightAll(Semigroup<R> rSemigroup, Either<L,R> x)
static <L,R>
Either<L,R>rightAll(Semigroup<R> rSemigroup, 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 RightAll<?,?> INSTANCE
-
-
Method Detail
-
checkedApply
public Semigroup<Either<L,R>> checkedApply(Semigroup<R> rSemigroup)
Description copied from interface:Fn2
Invoke this function with the given argument, potentially throwing anyThrowable
.- Specified by:
checkedApply
in interfaceFn1<L,R>
- Specified by:
checkedApply
in interfaceFn2<Semigroup<R>,Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>
- Specified by:
checkedApply
in interfaceSemigroupFactory<L,R>
- Parameters:
rSemigroup
- the argument- Returns:
- the result of the function application
-
rightAll
public static <L,R> RightAll<L,R> rightAll()
-
rightAll
public static <L,R> Fn1<Either<L,R>,Either<L,R>> rightAll(Semigroup<R> rSemigroup, Either<L,R> x)
-
-