Re:Beautiful folds in Haskell (2016)
by tathougies on Wednesday February 28, 2018 @04:18PM
(#16487053)
Stream fusion is only necessary for otherwise strict data types (like text, bytestring, vector, etc). Regular haskell lists will be 'fused' by default due to laziness, although the standard library does also fuse repeated list operations into an even more streamlined representation. However, this can be seen as more of a compiler optimization than anything, as it doesn't change the runtime complexity or the space complexity. Mapping over a list however many times always takes O(1) space, due to laziness.
[ Parent
| on HN ]
There are no comments on this comment yet.