Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The example given in the article can be addressed by using foldl' instead of foldr. The issue is discussed in

http://www.haskell.org/haskellwiki/Foldr_Foldl_Foldl

A Haskell programmer needs to understand when non-strict evaluation can/should be avoided. foldr is usually more elegant but sometimes less efficient.



Your link is missing the ' at the end.

http://www.haskell.org/haskellwiki/Foldr_Foldl_Foldl%27




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: