Notes - Functional Programming MT22, Fold fusion
Fold fusion theorem
Can you state the fold fusion theorem in full?
If
- $\text{f}$ is strict
- $\text{b = f a}$
- $\text{f (g x y) = h x (f y)}$ Then
Can you name the three conditions for the fold fusion theorem
$\text{f . fold g a = fold h b}$
to be applicable?
$\text{f . fold g a = fold h b}$
- $\text{f}$ is strict
- $\text{b = f a}$
- $\text{f (g x y) = h x (f y)}$