Class Merge<L,R>
- java.lang.Object
-
- com.jnape.palatable.lambda.semigroup.builtin.Merge<L,R>
-
- Type Parameters:
L
- The left parameter typeR
- The right parameter type
- All Implemented Interfaces:
Fn1<Semigroup<L>,Fn1<Semigroup<R>,Fn1<Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>>>
,Fn2<Semigroup<L>,Semigroup<R>,Fn1<Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>>
,Fn3<Semigroup<L>,Semigroup<R>,Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>
,Fn4<Semigroup<L>,Semigroup<R>,Either<L,R>,Either<L,R>,Either<L,R>>
,BiSemigroupFactory<Semigroup<L>,Semigroup<R>,Either<L,R>>
,Applicative<Fn1<Semigroup<R>,Fn1<Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>>,Fn1<Semigroup<L>,?>>
,Cartesian<Semigroup<L>,Fn1<Semigroup<R>,Fn1<Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>>,Fn1<?,?>>
,Cocartesian<Semigroup<L>,Fn1<Semigroup<R>,Fn1<Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>>,Fn1<?,?>>
,Contravariant<Semigroup<L>,Profunctor<?,Fn1<Semigroup<R>,Fn1<Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>>,Fn1<?,?>>>
,Functor<Fn1<Semigroup<R>,Fn1<Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>>,Fn1<Semigroup<L>,?>>
,Profunctor<Semigroup<L>,Fn1<Semigroup<R>,Fn1<Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>>,Fn1<?,?>>
,Monad<Fn1<Semigroup<R>,Fn1<Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>>,Fn1<Semigroup<L>,?>>
,MonadReader<Semigroup<L>,Fn1<Semigroup<R>,Fn1<Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>>,Fn1<Semigroup<L>,?>>
,MonadRec<Fn1<Semigroup<R>,Fn1<Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>>,Fn1<Semigroup<L>,?>>
,MonadWriter<Semigroup<L>,Fn1<Semigroup<R>,Fn1<Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>>,Fn1<Semigroup<L>,?>>
public final class Merge<L,R> extends java.lang.Object implements BiSemigroupFactory<Semigroup<L>,Semigroup<R>,Either<L,R>>
ASemigroup
instance formed byEither.merge(com.jnape.palatable.lambda.functions.Fn2<? super L, ? super L, ? extends L>, com.jnape.palatable.lambda.functions.Fn2<? super R, ? super R, ? extends R>, com.jnape.palatable.lambda.adt.Either<L, R>...)
and semigroups overL
andR
. LikeEither.merge(com.jnape.palatable.lambda.functions.Fn2<? super L, ? super L, ? extends L>, com.jnape.palatable.lambda.functions.Fn2<? super R, ? super R, ? extends R>, com.jnape.palatable.lambda.adt.Either<L, R>...)
, this is left-biased.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
Merge()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Semigroup<Either<L,R>>
checkedApply(Semigroup<L> lSemigroup, Semigroup<R> rSemigroup)
static <L,R>
Merge<L,R>merge()
static <L,R>
SemigroupFactory<Semigroup<R>,Either<L,R>>merge(Semigroup<L> lSemigroup)
static <L,R>
Semigroup<Either<L,R>>merge(Semigroup<L> lSemigroup, Semigroup<R> rSemigroup)
static <L,R>
Fn1<Either<L,R>,Either<L,R>>merge(Semigroup<L> lSemigroup, Semigroup<R> rSemigroup, Either<L,R> x)
static <L,R>
Either<L,R>merge(Semigroup<L> lSemigroup, 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.specialized.BiSemigroupFactory
apply, apply, checkedApply, flip, uncurry
-
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
checkedApply, toBiFunction
-
-
-
-
Field Detail
-
INSTANCE
private static final Merge<?,?> INSTANCE
-
-
Method Detail
-
checkedApply
public Semigroup<Either<L,R>> checkedApply(Semigroup<L> lSemigroup, Semigroup<R> rSemigroup)
Description copied from interface:Fn3
- Specified by:
checkedApply
in interfaceBiSemigroupFactory<Semigroup<L>,Semigroup<R>,Either<L,R>>
- Specified by:
checkedApply
in interfaceFn2<Semigroup<L>,Semigroup<R>,Fn1<Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>>
- Specified by:
checkedApply
in interfaceFn3<Semigroup<L>,Semigroup<R>,Either<L,R>,Fn1<Either<L,R>,Either<L,R>>>
-
merge
public static <L,R> Merge<L,R> merge()
-
merge
public static <L,R> SemigroupFactory<Semigroup<R>,Either<L,R>> merge(Semigroup<L> lSemigroup)
-
merge
public static <L,R> Semigroup<Either<L,R>> merge(Semigroup<L> lSemigroup, Semigroup<R> rSemigroup)
-
merge
public static <L,R> Fn1<Either<L,R>,Either<L,R>> merge(Semigroup<L> lSemigroup, Semigroup<R> rSemigroup, Either<L,R> x)
-
-