| Package | Description |
|---|---|
| io.atlassian.fugue.law |
| Modifier and Type | Method and Description |
|---|---|
static <A> IsEq<A> |
IsEq.isEq(A lhs,
A rhs)
Two equal elements
|
IsEq<A> |
MonoidLaws.monoidLeftIdentity(A x)
If the zero of your monoid is combine with an element of the type your
monoid works with the result should be that element.
|
IsEq<A> |
MonoidLaws.monoidRightIdentity(A x)
If an element of the type your monoid works with is combined with the zero
of your monoid result should be that element.
|
IsEq<A> |
SemigroupLaws.multiply1pEqualRepeatedAppend(int n,
A a)
The
Semigroup.multiply1p(int, Object) function of your semigroup
must be equal to Semigroup.sumNonEmpty(Object, Iterable) applied to
the input and an iterable containing n - 1 copies of that input |
IsEq<A> |
MonoidLaws.multiplyEqualRepeatedAppend(int n,
A a)
The multiply function of your monoid must be equal to the sum function
called with an iterable containing
n copies of the input type. |
IsEq<A> |
MonoidLaws.semigroupAssociative(A x,
A y,
A z)
A monoid must not care about the order elements are combined.
|
IsEq<A> |
SemigroupLaws.semigroupAssociative(A x,
A y,
A z)
A semigroup must not care about the order elements are combined.
|
IsEq<A> |
MonoidLaws.sumEqualFold(Iterable<A> as)
The sum function of your monoid must be equal to
Functions.fold(BiFunction, Object, Iterable) using append as the
folding function and zero() as the initial value |
IsEq<A> |
SemigroupLaws.sumNonEmptyEqualFold(A head,
Iterable<A> tail)
The
Semigroup.sumNonEmpty(Object, Iterable) function of your
semigroup must be equal to a
Functions.fold(BiFunction, Object, Iterable) where append is used
as the combining function, head is used as the initial value and tail is
the iterable to check |
Copyright © 2018 Atlassian. All rights reserved.