The condition to drop the suffix.
The list dropped the matched suffix.
expect([
...toIterator(
dropWhileEnd((x: number) => x < 3)(
fromArray([1, 2, 3, 4, 5, 1, 2]),
),
),
]).toStrictEqual([1, 2, 3, 4, 5]);
expect(
toArray(dropWhileEnd((x: number) => x < 9)(fromArray([1, 2, 3]))),
).toStrictEqual(
[],
);
expect(
toArray(dropWhileEnd((x: number) => x < 0)(fromArray([1, 2, 3]))),
).toStrictEqual(
[1, 2, 3],
);
Drops the largest suffix of the list in which
predholds for all elements of the suffix.