Function
fromSemigroup
(S: Semigroup<A>, empty: Monoid<A>["empty"])
Source from the content-addressed store, hash-verified
| 19 | * @since 0.24.0 |
| 20 | */ |
| 21 | export const fromSemigroup = <A>(S: Semigroup<A>, empty: Monoid<A>["empty"]): Monoid<A> => ({ |
| 22 | combine: S.combine, |
| 23 | combineMany: S.combineMany, |
| 24 | empty, |
| 25 | combineAll: (collection) => S.combineMany(empty, collection) |
| 26 | }) |
| 27 | |
| 28 | /** |
| 29 | * Get a monoid where `combine` will return the minimum, based on the provided bounded order. |
Tested by
no test coverage detected