ApolloZhu / BoolBuilder

A Swift resultBuilder for building a Bool.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BoolBuilder

@resultBuilder for building a Bool.

Example

import BoolBuilder

let condition: Bool = all {
    any {
        conditionA
        conditionB
            .inverted

        either {
            conditionC
        } or: {
            conditionD
        }
    }
    conditionE
}

Acknowledgements

Thanks to @Vince14Genius for the idea and API feedback.

About

A Swift resultBuilder for building a Bool.

License:MIT License


Languages

Language:Swift 100.0%