@[inline]
Case analysis on Bool as a function.
$$\text{bool}(x, y, b) = \begin{cases} x & \text{if } b = \text{false} \\ y & \text{if } b = \text{true} \end{cases}$$
This is the Church encoding eliminator for Bool.
Equations
- Data.DataBool.bool ifFalse ifTrue false = ifFalse
- Data.DataBool.bool ifFalse ifTrue true = ifTrue
Instances For
@[inline]
Guard: returns [x] if condition is true, [] otherwise.
$$\text{guard'}(b, x) = \begin{cases} [x] & \text{if } b \\ [] & \text{otherwise} \end{cases}$$