simon.vergauwen
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)) }) }) }