The finite list to count the length.
The number of elements in the list.
import { empty, fromString, length, singleton } from "./list.ts";
import { assertEquals } from "../deps.ts";
assertEquals(length(empty()), 0);
assertEquals(length(singleton(42)), 1);
assertEquals(length(fromString("foo")), 3);
Generated using TypeDoc
Counts elements in the list. If the list is infinite, it hangs forever.