A.dropWhile drops ALL items matching the predicate. It behaves exactly like A.reject:
import {A,D} from "@mobily/ts-belt"
console.log(
A.dropWhile([0 , 1, 0, 0, 0], (x) => x == 0), // should drop the first zero
A.reject ([0 , 1, 0, 0, 0], (x) => x == 0), // should drop all zeros
A.dropWhile([{},{foo: "Bar"},{},{},{}], (x) => D.isEmpty(x)), // should drop the first empty obj
A.reject([{},{foo: "Bar"},{},{},{}], (x) => D.isEmpty(x)), // should drop all empty objs
)
A.dropWhile
drops ALL items matching the predicate. It behaves exactly likeA.reject
: