> Like pipes in UNIX, the functions are clever enough to be performant when composed together–we don’t traverse the whole list and generate a new list each time, each item is generated on demand. In fact, due to stream fusion, the code will be compiled into one fast loop.
I imagine it is hard to do the same optimization in a non-lazy language.
How is that order of operations different to stream fusion? Why does stream fusion require more purity than Unix pipes?
[1] http://journal.stuffwithstuff.com/2015/02/01/what-color-is-y...