UNPKG

effect-ts-laws

Version:
15 lines 501 B
import { Monoid as MO } from '@effect/typeclass'; import { identity, pipe } from 'effect'; const combine = (self, that) => a => pipe(a, self, that); /** * @category instances */ export const getSemigroup = () => ({ combine, combineMany: (self, collection) => Array.from(collection).reduce((accumulator, value) => combine(accumulator, value), self), }); /** * @category instances */ export const getMonoid = () => MO.fromSemigroup(getSemigroup(), identity); //# sourceMappingURL=Endo.js.map