packages feed

dhall-1.4.2: Prelude/Optional/all

{-
Returns `False` if the supplied function returns `False` for a present element
and `True` otherwise:

Examples:

```
./all Natural Natural/even ([+3] : Optional Natural) = False

./all Natural Natural/even ([] : Optional Natural) = True
```
-}
let all : ∀(a : Type) → (a → Bool) → Optional a → Bool
    =   λ(a : Type)
    →   λ(f : a → Bool)
    →   λ(xs : Optional a)
    →   Optional/fold a xs Bool f True

in  all