Cześć, problem następujący:
sendRequest(request) //Try<Success>
.mapTry(request -> doSomething()) //zwraca request; Try<Either<Failure, Success>>
.toEither() //Either<Throwable, Either<Failure, Success>>
.mapLeft(throwable -> Failure.createFromThrowable(throwable, request.getId)) //Either<Failure, Either<Failure, Success>>
.flatMap(it -> it) //Either<Failure, Success>
Chciałbym jakoś do metody createFromThrowable(...)
przepchać lewą projekcję prawej projekcji (xD). mapLeftem tego nie ogarnę, jest jakiś sposób na coś takiego?