# Lecture - Functional Programming MT22, XII

> Source: https://ollybritton.com/notes/uni/prelims/mt22/functional-programming/lectures/12/ · Updated: 2022-11-26 · Tags: uni, lecture

- [Course - Functional Programming MT22](https://ollybritton.com/notes/uni/prelims/mt22/functional-programming/)

### Flashcards
Why is it a bad idea to use `foldr` or `foldl` to calculate something like the sum or product of a list?::
Because they are lazy, you can build up a huge expression before evaluating it.

When bounding space is a concern, what fold function should you use?::
`foldl'`

---
Olly Britton — https://ollybritton.com. Machine-readable index: https://ollybritton.com/llms.txt
