This is a similar question to Why doesn't Option have a fold method?, but for functional-java.
I want to perform some side-effect if an option is None. Is there something I can use other than if maybeT.isNone()
?
I'm thinking along the lines of Option<B> optionA.fold(Effect<Unit> none, F<A, B> some)
.
Is there something that already exists?