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

**URL:** <https://forums.swift.org/t/how-do-result-builders-handle-if-else-if-without-plain-else-chains/79344>\
**Category:** Using Swift\
**Tags:** result-builder\
**Created:** [April 18, 2025, 1:05am UTC](https://forums.swift.org/t/how-do-result-builders-handle-if-else-if-without-plain-else-chains/79344 "2025-04-18T01:05:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![CTMacUser](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/ctmacuser/32/1802_2.png) [@CTMacUser](https://forums.swift.org/u/CTMacUser)\
**Post date:** [April 18, 2025, 1:05am UTC](https://forums.swift.org/t/how-do-result-builders-handle-if-else-if-without-plain-else-chains/79344/1 "2025-04-18T01:05:26Z")

</div>

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?
