import { type Monoid } from "https://deno.land/x/fun@v.2.0.0-alpha.11/monoid.ts";
A Monoid is an algebra with a notion of emptiness. In addition to this it extends the algebra of a Semigroup. This means that an instance of Monoid has the methods empty and concat.
An instance of Monoid must obey the following laws:
- Associativity: pipe(a, concat(b), concat(c)) === pipe(a, concat(pipe(b, concat(c))))
- Right identity: concat(a)(empty()) === a
- Left identity: concat(M.empty())(a) === a
The original type came from static-land
Properties
readonly
empty: () => T