Class RightAny<L,R>

java.lang.Object
com.jnape.palatable.lambda.monoid.builtin.RightAny<L,R>
Type Parameters:
L - The left parameter type
R - The right parameter type
All Implemented Interfaces:
Fn1<Monoid<R>,Fn1<Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>>, Fn2<Monoid<R>,Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>, Fn3<Monoid<R>,Either<L,R>,Either<L,R>,Either<L,R>>, MonoidFactory<Monoid<R>,Either<L,R>>, SemigroupFactory<Monoid<R>,Either<L,R>>, Applicative<Fn1<Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>,Fn1<Monoid<R>,?>>, Cartesian<Monoid<R>,Fn1<Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>,Fn1<?,?>>, Cocartesian<Monoid<R>,Fn1<Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>,Fn1<?,?>>, Contravariant<Monoid<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<Monoid<R>,?>>, Profunctor<Monoid<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<Monoid<R>,?>>, MonadReader<Monoid<R>,Fn1<Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>,Fn1<Monoid<R>,?>>, MonadRec<Fn1<Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>,Fn1<Monoid<R>,?>>, MonadWriter<Monoid<R>,Fn1<Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>,Fn1<Monoid<R>,?>>

public final class RightAny<L,R> extends Object implements MonoidFactory<Monoid<R>,Either<L,R>>
A Monoid instance formed by Either<L,R> and a monoid over R. The application to two Either values is right-biased, such that for a given Either x and y:
  • if both x and y are right values, the result is the application of the x and y values in terms of the provided monoid, wrapped in Either.right(R)
  • if only x is a right value, the result is x
  • if only y is a right value, the result is y
  • if neither x nor y are right values, the result is y

For the Semigroup, see RightAny.

See Also: