A calculus of functions for program derivation (1987)
cs.ox.ac.uk
cs.ox.ac.uk
A good example of the sort of thing this lets you do is the fold fusion, which (under the conditions which you need to derive the equality) lets you collapse multiple calls to fold (reduce) in to a single call, with a combined function:
foldr f e (foldr g e' xs) = foldr h i xs
When the first foldr is something like tails, which produces a list of lists of length ~|xs| this can turn an N^2 operation into a linear one, mechanically!