The list to be converted.
The generator of elements.
import { iota, successors, toIterator } from "./list.ts";
import { assertEquals } from "../deps.ts";
const iter = toIterator(iota);
assertEquals(iter.next(), { value: 0, done: false });
assertEquals(iter.next(), { value: 1, done: false });
assertEquals(iter.next(), { value: 2, done: false });
assertEquals(iter.next(), { value: 3, done: false });
Generated using TypeDoc
Converts the list into a
Generator
iterator.