Any one know any books or resources that concentrate on invariant programming? Translating recursive code into properly tail recursive or iterative code can be pretty difficult.
`Pearls of Algorithmic Design` by Bird - Beautiful little book. It's a series of problems that are solved by first writing the naive program and then transforming it rigorously to make it more efficient.
`Algebra of Programming` by Bird and De Moor - This a treatment of the theory that is implicit in the methods of the previous book.