For now this is best, this is actually also safe b...
# arrow
s
For now this is best, this is actually also safe because the
unsafe
is run in a suspend function. So this is still a pure function
Copy code
suspend fun <A> IO<A>.runSuspend(): A = suspendCoroutine { cont ->
     unsafeRunAsync { either ->
       either.fold({ e -> cont.resumeWithException(e) }, { a -> cont.resumeWith(a) })
    }
}