packages feed

dhall-1.7.0: Prelude/Bool/odd

{-
Returns `True` if there are an odd number of `True` elements in the list and
returns `False` otherwise

Examples:

```
./odd ([True, False, True] : List Bool) = False

./odd ([True, False] : List Bool) = True

./odd ([True] : List Bool) = True

./odd ([] : List Bool) = False
```
-}
    let odd
        : List Bool → Bool
        =   λ(xs : List Bool)
          → List/fold Bool xs Bool (λ(x : Bool) → λ(y : Bool) → x != y) False

in  odd