StreamClass.prototype.takeWhile(predicate: (value: T,index: number) => boolean): StreamClass<T, E>
Ends the stream at the first value predicate refuses. Failures inside the window pass
through and are never tested — the predicate speaks about values only.
await Stream.from([1, 2, 9, 1]).takeWhile((n) => n < 5).collect(); // [1, 2]
predicate: (value: T,index: number) => boolean
StreamClass<T, E>