type Worker
import bend-kit-concurrency@0.2.0.0/concurrency.bend as Concurrencyimport Base
144# A pool worker between channel steps. It owns its state s alone.
145type Worker<-S: Type, -A: Type, -B: Type> is Type:
146 WIdle{s: S}
147 WGot{s: S, got: Maybe<&1, A & Chan(B)>}
148 WDone{sb: S & B, reply: Chan(B)}