Skip to content

Documentation: Improve Foldable1 documentation

meooow requested to merge meooow/ghc:foldable1-doc into master
  • Explain foldrMap1, foldlMap1, foldlMap1', and foldrMap1' in greater detail, the text is mostly adapted from documentation of Foldable.
  • Describe foldr1, foldl1, foldl1' and foldr1' in terms of the above functions instead of redoing the full explanation.
  • Small updates to documentation of fold1, foldMap1 and toNonEmpty, again adapting from Foldable.
  • Update the foldMap1 example to lists instead of Sum since this is recommended for lazy right-associative folds.

Fixes #22847 (closed)

Merge request reports