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