The value to be appended.
The appended list.
import { List, appendToHead, singleton, toIterator } from "./list.ts";
import { assertEquals } from "../deps.ts";
const iter = toIterator(appendToHead(1)(singleton(4)));
assertEquals(iter.next(), { value: 1, done: false });
assertEquals(iter.next(), { value: 4, done: false });
assertEquals(iter.next(), { value: undefined, done: true });
Generated using TypeDoc
Appends the element to head of the list.