I have below code
def processInfoAndReturnResponse(input: Input]): EitherT[Future, CustomException, A] = ???
def sendMessage(message: A): monix.eval.Task[Boolean] = ???
def anotherMethod(message: Input): Future[Either[CustomException, Unit]]= ???
def integrate(): Future[Either[GoogleException, A]] = {
(for {
response <- processInfoAndModelResponse(input)
_ <- EitherT.liftF[Future, CustomException, A](sendMessage(response).map(_ => response).runToFuture
}yield response).value
so far all this is good. But now, I want to get boolean from sendMessage and then only if sendMessage returns true, I want to call anotherMethod.
I understand they are different monads. Please let me know a cleaner way how I can add all three calls in for comprehension. Appreciate help