T - The object type that this monoid instance handles.public interface Monoid<T>
add(Object, Object) method for combining two objects.| Modifier and Type | Method and Description |
|---|---|
T |
add(T first,
T second)
Combines
first and second together. |
static <T> Monoid<List<T>> |
listMonoid()
Creates a monoid instance for
List. |
T |
point()
Returns the identity element of this monoid.
|
T point()
add(Object, Object)T add(T first, T second)
first and second together.
When the identity element is combined with any other object, the result is the other input parameter.
first - The first input.second - The second input.