The function to be mapped.
The function mapped on List
.
import { iota, successors, toIterator, map } from "./list.ts";
import { assertEquals } from "../deps.ts";
const mapped = toIterator(map((x: number) => x * 3 + 1)(iota));
assertEquals(mapped.next(), { value: 1, done: false });
assertEquals(mapped.next(), { value: 4, done: false });
assertEquals(mapped.next(), { value: 7, done: false });
assertEquals(mapped.next(), { value: 10, done: false });
Generated using TypeDoc
Maps the function from
T
toU
ontoList
.