How to compose two mapping functions into a third?
nostrademons: What you want is basically the compiler optimization called deforestation:http://en.wikipedia.org/wiki/Deforestation_(computer_science)It's only valid in a pure language, and in a strict language, it has the embarassing side-effect that it can sometimes make non-terminating programs terminate.