semigroup library

Classes

BaseSemigroup<T>
BaseSemigroup is an abstract class that defines a generic type for Semigroups.

Functions

concatAll<T>(BaseSemigroup<T> semigroup) → T Function(List<T>) Function(T)
Creates a function that concatenates a list of elements starting from a given element.
constant<A>(A a) BaseSemigroup<A>
Creates a semigroup that always returns a specific constant value, ignoring its arguments.
first<A>() BaseSemigroup<A>
Creates a semigroup that always selects the first of two elements.
intercalate<A>(A middle) BaseSemigroup<A> Function(BaseSemigroup<A>)
Creates a semigroup that concatenates elements with a specific "middle" element.
last<A>() BaseSemigroup<A>
Creates a semigroup that always selects the second of two elements.
max<A>(Ord<A> order) BaseSemigroup<A>
Creates a semigroup that uses an Ord instance to pick the maximum of two elements.
min<A>(Ord<A> order) BaseSemigroup<A>
Creates a semigroup that uses an Ord instance to pick the minimum of two elements.
reverse<A>(BaseSemigroup<A> semigroup) BaseSemigroup<A>
Creates a semigroup that reverses the order of its arguments before concatenating.