fold
import { fold } from "https://github.gh-proxy.cn/raw.githubusercontent.com/baetheus/fun/main/datum.ts";Fold over a Datum to produce a single value.
@example
import { fold, initial, replete } from "./datum.ts";
const folder = fold(
(acc: number, value: number) => acc + value,
0
);
console.log(folder(initial)); // 0
console.log(folder(replete(5))); // 5