The condition to decide to drop from the list.
The filtered list.
expect([
...toIterator(
dropWhile((x: number) => x < 3)(
fromArray([1, 2, 3, 4, 5, 1, 2, 3]),
),
),
]).toStrictEqual([3, 4, 5, 1, 2, 3]);
expect(
toArray(dropWhile((x: number) => x < 9)(fromArray([1, 2, 3]))),
).toStrictEqual(
[],
);
expect(
toArray(dropWhile((x: number) => x < 0)(fromArray([1, 2, 3]))),
).toStrictEqual(
[1, 2, 3],
);
Drops while the element satisfies
pred. If the element does not matchpred, the rest of elements are yielded.