Re:Rust as a gateway drug to Haskell
by hydraz on Wednesday June 14, 2017 @04:51PM
(#14556026)
GHC doesn't actually perform stream fusion. Not by default, anyway: The default (by that I mean "ships with base", not that it's baked into the compiler) is something weaker, called build/foldr fusion, described by this rule:
Foldr is the usual catamorphism for the inductive list type, and build is an "abstracted constructor", of sorts:
Note that build's argument is rank-2 polymorphic, and also the same as foldr's type.
[ Parent
| on HN ]
There are no comments on this comment yet.