Folds and Monoids (CIS194 Wk 7) by George Wilson

Folds and Monoids (CIS194 Wk 7)

By George Wilson

This is the seventh instalment of Brent Yorgey's Introduction to Haskell lectures.

We've seen how a list can be aggregated into a single value using folds. This lecture explores how we might create similar folds for our own data structures; yet another example of how higher-order functions save us from repeating ourselves. The lecture will also explore monoids, one of Haskell's most prevalent typeclasses.