@resultBuilder
for building a Bool
.
import BoolBuilder
let condition: Bool = all {
any {
conditionA
conditionB
.inverted
either {
conditionC
} or: {
conditionD
}
}
conditionE
}
Thanks to @Vince14Genius for the idea and API feedback.