effect-ts-laws
Version:
effect-ts law testing using fast-check.
15 lines • 501 B
JavaScript
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