def IO.fork.go

Base · base.bend:276

import Base
276def IO.fork.go(-A: Type, act: IO(A), chan: Chan(A)) -> IO(Chan(A)):
277  +c = chan
278  sent = IO.bind(A, Result<&1, &1, A, Unit>, act, x => Chan.send(A, c, x))
279  IO.bind(Unit, Chan(A), IO.spawn(Result<&1, &1, A, Unit>, sent),
280    u => IO.pure(Chan(A), c))

Uses (8)

Used by (4)