How do result builders handle if/else-if, without plain else, chains?

As I understand it for Result Builders,

  • a lone if statement maps to a build-optional
  • an if-else pair maps to two build-either calls
  • a switch maps to a tree of build-either calls
  • an if/(else-if)/else chain also maps to a tree of build-either calls

So what happens for if/(else-if) chain with no plain-else case? A bunch of build-either ending with a build-optional?

2 Likes