4 ms·
foldr usually gets deforested in GHC, so the intermediate list probably doesn't exist. GHC rewrites most of the common built-in functions to eliminate intermed
by PeCaN 11y ago
foldr usually gets deforested in GHC, so the intermediate list probably doesn't exist.
GHC rewrites most of the common built-in functions to eliminate intermediate trees and lists. You can see a list https://downloads.haskell.org/~ghc/7.0.1/docs/html/users_guide/rewrite-rules.html https://downloads.haskell.org/~ghc/7.0.1/docs/html/users_gui... (section 7.14.4; ctrl-f "good producer").
- deleted 11y ago[deleted]