Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • 1
    The big exception is if the function passed to foldl does nothing but apply constructors to one or more of its arguments. Commented Mar 8, 2016 at 2:03
  • Is there a general pattern to when foldl is actually the best choice? (Like infinite lists when foldr is the wrong choice, optimization-wise.?) Commented Jan 7, 2018 at 1:42
  • @Evi1M4chine not sure what you mean by foldr being the wrong choice for infinite lists. In fact, you shouldn't use foldl or foldl' for infinite lists. See the Haskell wiki on stack overflows Commented Feb 6, 2020 at 19:51