/** * @since 0.24.0 */ import type { Kind, TypeLambda } from "effect/HKT" import type { Invariant } from "./Invariant.js" import type { Semigroup } from "./Semigroup.js" /** * @category type class * @since 0.24.0 */ export interface SemiCoproduct extends Invariant { readonly coproduct: ( self: Kind, that: Kind ) => Kind readonly coproductMany: ( self: Kind, collection: Iterable> ) => Kind } /** * @since 0.24.0 */ export const getSemigroup = (F: SemiCoproduct) => (): Semigroup< Kind > => ({ combine: F.coproduct, combineMany: F.coproductMany })