rpillay
05/20/2021, 4:09 AMsomeEither.flatMap { someCoroutineMethod() <- // this causes an error - "Suspension functions can be called only within coroutine body" }
If we were to make flatMap an inline function (ie.
inline fun <A, B, C> EitherOf<A, B>.flatMap(f: (B) -> Either<A, C>): Either<A, C> = ...
That would allow it to be called. This is similar to the .fold we have on Either. Is there a reason we shouldn't make this change?carbaj0
05/20/2021, 7:08 AMrpillay
05/23/2021, 4:07 AMrpillay
05/23/2021, 4:07 AMcarbaj0
05/24/2021, 8:02 AM