learnyouahaskell / learnyouahaskell.github.io

A community version of the renowned "Learn You a Haskell" (LYAH) tutorials collection!
https://learnyouahaskell.github.io
Other
317 stars 39 forks source link

Prelude folds now apply to any Foldable #50

Open Pi-Cla opened 1 year ago

Pi-Cla commented 1 year ago

Related to #49, Prelude folds nowadays can fold on any Foldable so the entire sub-section of Monoids titled "Using monoids to fold data structures" which describes needing to import folds from Foldable in order to do so is out of date. Also, this sub-section on foldM uses the outdated datatype for folds too.