collapse
import { collapse } from "https://github.gh-proxy.cn/raw.githubusercontent.com/baetheus/fun/main/record.ts";Collect all values in a ReadonlyRecord into a single value I by using a Combinable. This is effectively fold using a Combinable for the initial value and combination.
@example
import * as R from "./record.ts";
import { InitializableNumberSum } from "./number.ts";
import { pipe } from "./fn.ts";
const result = pipe(
{ one: 1, two: 2, three: 3 },
R.collapse(InitializableNumberSum),
); // 6