A
- the Maybe value parameter typepublic final class Absent<A> extends Object implements SemigroupFactory<Semigroup<A>,Maybe<A>>
Semigroup
instance formed by Maybe
<A>
and a semigroup over A
. The
application to two Maybe
values is absence-biased, such that for a given Maybe
x
and y
:
x
is absent, the result is x
x
is present and y
is absent, the result is y
x
and y
are present, the result is the application of the x and y values in
terms of the provided semigroup, wrapped in Maybe.just(A)
Modifier and Type | Method and Description |
---|---|
static <A> Absent<A> |
absent() |
static <A> Semigroup<Maybe<A>> |
absent(Semigroup<A> semigroup) |
static <A> Fn1<Maybe<A>,Maybe<A>> |
absent(Semigroup<A> aSemigroup,
Maybe<A> x) |
static <A> Maybe<A> |
absent(Semigroup<A> semigroup,
Maybe<A> x,
Maybe<A> y) |
Semigroup<Maybe<A>> |
checkedApply(Semigroup<A> aSemigroup)
Invoke this function with the given argument, potentially throwing any
Throwable . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
apply, checkedApply
apply, apply, checkedApply, compose, contraMap, diMapL, discardR, flip, fn3, fn3, fn3, uncurry, widen
curried, curry, fn2, fromBiFunction, toBiFunction
public Semigroup<Maybe<A>> checkedApply(Semigroup<A> aSemigroup)
Fn2
Throwable
.checkedApply
in interface Fn1<Semigroup<A>,Fn1<Maybe<A>,Fn1<Maybe<A>,Maybe<A>>>>
checkedApply
in interface Fn2<Semigroup<A>,Maybe<A>,Fn1<Maybe<A>,Maybe<A>>>
checkedApply
in interface SemigroupFactory<Semigroup<A>,Maybe<A>>
aSemigroup
- the argumentpublic static <A> Absent<A> absent()