Sharing some learnings: After playing with the solutions that <@U0RM4EPC7> and <@U02R73TJNCA> gave, ...
s
Sharing some learnings: After playing with the solutions that @simon.vergauwen and @Tiberiu Tofan gave, I realized that replacing
if
/`else` doesn’t make sense since every one of my use cases has lambdas returning
Unit
. If they didn’t return
Unit
, Either.conditionally() should be a good fit.