Portability | GHCspecific |
---|---|
Stability | stable |
Maintainer | Joachim Breitner <mail@joachim-breitner.de> |
Safe Haskell | None |
- fuseThis :: [a] -> [a]
Documentation
This function can be wrapped around a list that should be compiled away by list fusion. If it does, this function will disappear. If not, it will throw an error at runtime.
main = print $ foldl (+) 0 (fuseThis [0..1000])
Will print Test: fuseList: List did not fuse
, while
main = print $ foldl (+) 0 (fuseThis [0..1000])
will print 500500
.