suspend fun one(): Either<Error, Int>
suspend fun two(i: Int): Either<Error, Value>
launch{
one().fold(::Left, { right ->
two(right) /// <- Kotlin is complaining that this needs to be in a coroutine scope
}
}
Can you do this?
p
pakoito
05/04/2020, 6:32 PM
put two in another launch scope
pakoito
05/04/2020, 6:32 PM
this is something with the inliner and kx.coroutines
k
kobby
05/04/2020, 7:08 PM
Yeah that's what I was thinking as well... It felt a bit wrong but I am still learning this stuff