Closed imcotton closed 9 months ago
Taking id as mempty of Monoid.
id
mempty
Monoid
btw, the following also works, point-free and more clean.
const encode = args.map((i: any) => i.encode).reduceRight(wrap, id) as any; const decode = args.map((i: any) => i.decode).reduce(wrap, id) as any;
Taking
id
asmempty
ofMonoid
.