effect-io-ai

Package: effect
Module: Schedule

Schedule.collectWhile

Collects all inputs into a Chunk while a condition holds.

Details

This function creates a schedule that continuously collects inputs into a Chunk while the given predicate function f evaluates to true. As soon as the condition fails, the schedule stops.

Signature

declare const collectWhile: <A>(f: Predicate<A>) => Schedule<Chunk.Chunk<A>, A>

Source

Since v2.0.0