“…Function lrev is that seen in the Introduction, and flatten gathers leaves in a tree, Since both lrev and flatten are accumulative, their fusion is nontrivial. The situation is very similar to grayCode discussed in Sections 4 and 5: unfoldingfolding cannot deforest the intermediate list, and the foldr/build rule yields a program that accumulates complicated closures, whereas more sophisticated methods (Kühnemann, 1998;Correnson et al, 1999;Nishimura, 2003;Nishimura, 2004;Voigtländer, 2004;Voigtländer & Kühnemann, 2004;Katsumata & Nishimura, 2008) can deal with it.…”