Skip to content

Improve wording of fold[lr]M documentation.

vdukhovni requested to merge trac-vdukhovni/ghc:foldxM-doc into master

This is a documentation only MR to improve the description of the sequencing of monadic effects with foldlM and foldrM. I hope the new text is more clear. The commit message reads:

The sequencing of monadic effects in foldlM and foldrM was described as
respectively right-associative and left-associative, but this could be
confusing, as in essence we're just composing Kleisli arrows, whose
composition is simply associative.

What matters therefore is the order of sequencing of effects, which
can be described more clearly without dragging in associativity as
such.

This avoids describing these folds as being both left-to-right and
right-to-left depending on whether we're tracking effects or operator
application.  The new text should be easier to understand.
Edited by vdukhovni

Merge request reports