Hacker News new | ask | show | jobs
by pseudonom- 2977 days 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-... and a lengthier paper is at http://fun.cs.tufts.edu/stream-fusion.pdf.