3 ms·
When the compiler handles this, it is usually called "automatic deforestation". One technique for this (that Haskell's compiler implements) is "stream fusion".
by pseudonom- 8y ago
When the compiler handles this, it is usually called "automatic deforestation". One technique for this (that Haskell's compiler implements) is "stream fusion". A brief overview of stream fusion is given at https://stackoverflow.com/questions/578063/what-is-haskells-stream-fusion https://stackoverflow.com/questions/578063/what-is-haskells-... and a lengthier paper is at http://fun.cs.tufts.edu/stream-fusion.pdf http://fun.cs.tufts.edu/stream-fusion.pdf.