Class LeftAll<L,R>

java.lang.Object
com.jnape.palatable.lambda.monoid.builtin.LeftAll<L,R>
Type Parameters:
L - The left parameter type
R - 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 Object implements MonoidFactory<Monoid<L>,Either<L,R>>
A Monoid instance formed by Either<L,R> and a monoid over L. The application to two Either values short-circuits on right values, such that for a given Either x and y:
  • if x is a Right value, the result is x
  • if y is a Right value, the result is y
  • if both x and y are left values, the result is the application of the x and y values in terms of the provided monoid, wrapped in Either.left(L)

For the Semigroup, see LeftAll.

See Also: