# Haskell Authors - Foldl (Highlights) ![rw-book-cover|256](https://readwise-assets.s3.amazonaws.com/static/images/article1.be68295a7e40.png) ## Metadata **Review**:: [readwise.io](https://readwise.io/bookreview/57950167) **Source**:: #from/readwise #from/reader **Zettel**:: #zettel/fleeting **Status**:: #x **Authors**:: [[Haskell Authors]] **Full Title**:: Foldl **Category**:: #articles #readwise/articles **Category Icon**:: 📰 **URL**:: [wiki.haskell.org](https://wiki.haskell.org/Foldr_Foldl_Foldl') **Host**:: [[wiki.haskell.org]] **Highlighted**:: [[2026-01-30]] **Created**:: [[2026-02-01]] ## Highlights - The reason we can't reduce it is that the chain doesn't contain [an expression which can be reduced](https://wiki.haskell.org/index.php?title=Reducible_expression) (a *[redex](https://wiki.haskell.org/index.php?title=Reducible_expression)*, for **red**ucible **ex**pression.) ([View Highlight](https://read.readwise.io/read/01kg66s3ev3kfsd3w51aptb36a)) ^983078046 - *seq* is a primitive system function that when applied to *x* and *y* will first reduce *x* then return *y*. ([View Highlight](https://read.readwise.io/read/01kg66vmchrwnd1tatntwzn5p5)) ^983078085 - Usually the choice is between `foldr` and `foldl'`, since `foldl` and `foldl'` are the same except for their strictness properties, so if both return a result, it must be the same. `foldl'` is the more efficient way to arrive at that result because it doesn't build a huge thunk. ([View Highlight](https://read.readwise.io/read/01kg66ygmer4bjv963mg59e3af)) ^983078265 - Failing that, the "brute force" solution is to use [deepseq](http://hackage.haskell.org/package/deepseq). ([View Highlight](https://read.readwise.io/read/01kg670szyg42qr1raspndfyvk)) ^983078310 - Another reason that `foldr` is often the better choice is that the folding function can *short-circuit*, that is, terminate early by yielding a result which does not depend on the value of the accumulating parameter. ([View Highlight](https://read.readwise.io/read/01kg674g07c9p5a0w65ppztv17)) ^983078386 By not evaluating `acc`