If I have a coroutine suspend function that returns an Either<Error, Foo>, is there a way to combine the scopes?
scope.launch { either { val x = x().bind
shouldn’t compile, because
x()
needs to be called from a coroutine scope.
either { scope.launch { val x = x().bind
should fail at runtime, since the bind exception can’t be caught by the
either
, right?
So, what can I do?