The separator element.
The joined list.
import { empty, fromArray, fromString, intercalate, singleton, toString } from "./list.ts";
import { assertEquals } from "../deps.ts";
assertEquals(intercalate(singleton(0))(empty()), empty());
const joined = intercalate(fromString(", "))(
fromArray([fromString("foo"), fromString("bar"), fromString("bee")]),
);
assertEquals(toString(joined), "foo, bar, bee");
Generated using TypeDoc
Joins
separator
items among each list of the list.