Foldable
import type { Foldable } from "https://raw.githubusercontent.com/baetheus/fun/main/foldable.ts";
A Foldable structure has the method fold.
@example
import * as A from "./array.ts";
import { pipe } from "./fn.ts";
const numbers = [1, 2, 3, 4, 5];
const sum = pipe(
numbers,
A.FoldableArray.fold(
(acc, value) => acc + value,
0
)
);
console.log(sum); // 15