The element generator.
The infinite list with value
element.
import { repeat, toIterator } from "./list.ts";
import { assertEquals } from "../deps.ts";
const iter = toIterator(repeat(13));
assertEquals(iter.next(), { value: 13, done: false });
assertEquals(iter.next(), { value: 13, done: false });
assertEquals(iter.next(), { value: 13, done: false });
assertEquals(iter.next(), { value: 13, done: false });
Generated using TypeDoc
Creates an infinite list with
value
.