Class LeftAny<L,R>

java.lang.Object
com.jnape.palatable.lambda.semigroup.builtin.LeftAny<L,R>
Type Parameters:
L - The left parameter type
R - 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 Object implements SemigroupFactory<Semigroup<L>,Either<L,R>>
A Semigroup instance formed by Either<L,R> and a semigroup over L. The application to two Either values is left-biased, such that for a given Either x and 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 semigroup, wrapped in Either.left(L)
  • if only x is a left value, the result is x
  • if only y is a left value, the result is y
  • if neither x nor y are left values, the result is y

For the Monoid, see LeftAny.

See Also: