map<O2> method

Conveyor<F, O2> map<O2>(
  1. O2 f(
    1. O o
    )
)
override

Implementation

Conveyor<F, O2> map<O2>(O2 f(O o)) =>
    interpret((h, t) => tryOrDie(() => produce(f(h), t.map(f))),
        (req, recv) => consume(req, (ea) => recv(ea).map(f)),
        halt);