The fold operation.
The folded value.
import { foldL, fromString } from "./list.ts";
import { assertEquals } from "../deps.ts";
assertEquals(
foldL((x: string) => (y: string) => y + x)("")(fromString("hoge")),
"egoh",
);
assertEquals(
foldL((x: string) => (y: string) => y + x)("")(fromString("")),
"",
);
Generated using TypeDoc
Folds the elements of list from left.