Chaining Maybe in rxjava for "else" or "coallesce"

Viewed 496

I'm fairly new to rxjava, so apologies if this is a silly question. I have two Maybes (call them A and B) that I want to compose in such a way that I get a 3rd Maybe.

If A succeeds, I want my composite to succeed with that same value. If A errors, I want my composite to error with that same throwable. If A completes without emitting a value, I want to then delegate to B.

Is there an easy way to achieve this?

1 Answers
Related