AN
Size: a a a
AN
RE
RE
AN
VV
AL
NT
AL
VG
NT
ГК
QH
ГК
ГК
ДК
Flow<Either<Error,Res>>
наиболее элегантно получить Flow<Res>?AM
Flow<Either<Error,Res>>
наиболее элегантно получить Flow<Res>?.flatMapConcat {
when(it) {
is Left -> log(it)
is Right -> flowOf(it)
}
}
КР
Flow<Either<Error,Res>>
наиболее элегантно получить Flow<Res>?flow.mapNotNull { either ->
either.fold(
ifLeft = {
log(it)
null
},
ifRight = { it }
)
)
AM
ДК
flow.mapNotNull { either ->
either.fold(
ifLeft = {
log(it)
null
},
ifRight = { it }
)
)
ДК
.flatMapConcat {
when(it) {
is Left -> log(it)
is Right -> flowOf(it)
}
}