consumeL<L, R, O> static method

Conveyor<Both<L, R>, O> consumeL<L, R, O>(
  1. Function1<L, Conveyor<Both<L, R>, O>> recv, [
  2. Function0<Conveyor<Both<L, R>, O>>? fallback
])

Implementation

static Conveyor<Both<L, R>, O> consumeL<L, R, O>(Function1<L, Conveyor<Both<L, R>, O>> recv, [Function0<Conveyor<Both<L, R>, O>>? fallback]) =>
    Conveyor.consume(new Both(BothDirection.LEFT), (Either<Object, L> ea) => ea.fold(
        (err) => err == Conveyor.End ? (fallback == null ? halt() : fallback()) : Conveyor.halt(err)
    ,(L l) => Conveyor.Try(() => recv(l))));