The length to drop.
The dropped list.
import { drop, range, toIterator } from "./list.ts";
import { assertEquals } from "../deps.ts";
const dropped = drop(2)(range(1, 6));
const iter = toIterator(dropped);
assertEquals(iter.next(), { value: 3, done: false });
assertEquals(iter.next(), { value: 4, done: false });
assertEquals(iter.next(), { value: 5, done: false });
assertEquals(iter.next(), { value: undefined, done: true });
Generated using TypeDoc
Drops the prefix of length
count
. Ifcount >= length(list)
, the empty list will be returned.