scanWhile<I, O> static method
Implementation
static Conveyor<From<I>, O> scanWhile<I, O>(O z, Function2<O, I, O> f, Function1<O, bool> p) {
Conveyor<From<I>, O> go(O previous) => consume((I i) {
final current = f(previous, i);
return produce(current, p(current) ? go(current) : halt());
});
return go(z);
}