``` fun <A> (suspend () ->A).toIO(): IO&l...
# arrow
s
Copy code
fun <A> (suspend () ->A).toIO(): IO<A> = IO.async { _, callback ->
  this.startCoroutine(Continuation(EmptyCoroutineContext) { result ->
    result.fold({ a -> cb(Right(a)) }, { e -> cb(Left(e)) })
  })
}