repeatUntilExhausted method

Conveyor<F, O> repeatUntilExhausted()

Implementation

Conveyor<F, O> repeatUntilExhausted() =>
    interpret((h, t) => produce(h, t.lazyPlus(repeatUntilExhausted)),
        (req, recv) => consume(req, (ea) => ea.fold((l) => recv(left(l)), (r) => recv(right(r)).lazyPlus(repeatUntilExhausted))),
        halt);