Class Trivial
- java.lang.Object
-
- com.jnape.palatable.lambda.monoid.builtin.Trivial
-
- All Implemented Interfaces:
Fn1<Unit,Fn1<Unit,Unit>>,Fn2<Unit,Unit,Unit>,Applicative<Fn1<Unit,Unit>,Fn1<Unit,?>>,Cartesian<Unit,Fn1<Unit,Unit>,Fn1<?,?>>,Cocartesian<Unit,Fn1<Unit,Unit>,Fn1<?,?>>,Contravariant<Unit,Profunctor<?,Fn1<Unit,Unit>,Fn1<?,?>>>,Functor<Fn1<Unit,Unit>,Fn1<Unit,?>>,Profunctor<Unit,Fn1<Unit,Unit>,Fn1<?,?>>,Monad<Fn1<Unit,Unit>,Fn1<Unit,?>>,MonadReader<Unit,Fn1<Unit,Unit>,Fn1<Unit,?>>,MonadRec<Fn1<Unit,Unit>,Fn1<Unit,?>>,MonadWriter<Unit,Fn1<Unit,Unit>,Fn1<Unit,?>>,Monoid<Unit>,Semigroup<Unit>
public final class Trivial extends java.lang.Object implements Monoid<Unit>
-
-
Constructor Summary
Constructors Modifier Constructor Description privateTrivial()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description UnitcheckedApply(Unit x, Unit y)Unitidentity()The identity element of this monoid.static Trivialtrivial()static Fn1<Unit,Unit>trivial(Unit x)static Unittrivial(Unit x, Unit 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
apply, apply, checkedApply, compose, contraMap, diMapL, discardR, toBiFunction, uncurry, widen
-
Methods inherited from interface com.jnape.palatable.lambda.monoid.Monoid
flip, foldLeft, foldMap, foldRight, reduceLeft, reduceRight
-
-
-
-
Field Detail
-
INSTANCE
private static final Trivial INSTANCE
-
-
Method Detail
-
identity
public Unit identity()
Description copied from interface:MonoidThe identity element of this monoid.
-
checkedApply
public Unit checkedApply(Unit x, Unit y) throws java.lang.Throwable
- Specified by:
checkedApplyin interfaceFn2<Unit,Unit,Unit>- Throws:
java.lang.Throwable
-
trivial
public static Trivial trivial()
-
-