[Haskell-cafe] MonadFix wiki confusion
erkokl at gmail.com
Thu Oct 22 04:48:29 UTC 2015
You are correct that the lazy construction of the tuple is crucial in
tying-the-monadic-knot. However, the point about making the BTree
constructors strict is still interesting, as it pertains to delayed use of
recursive values, rather than how they are represented/stored. The
situation is really no different than a regular recursive let-expression in
a non-monadic context.
Of course, it would still be fine to update the text to make that point
clear like you suggested, should you be so inclined!
On Sun, Oct 18, 2015 at 7:40 AM, Samuel Rødal <srodal at gmail.com> wrote:
> the MonadFix wiki at https://wiki.haskell.org/MonadFix has a statement
> that I feel is a bit misleading.
> In section "2.2 Lazy algorithm interleaved with effects", it claims
> that making the BTree data structure strict doesn't cause endless
> Well, that's true, but that's just because rep_x_sum returns a tuple
> containing the BTree and the summed values of the current subtree, and
> the tuple is lazily constructed - postponing the construction of the
> tree value. So highlighting the fact that the function still works
> when the BTree structure is made strict is kind of a red herring.
> Maybe the confusion could be avoided by removing the part about making
> BTree strict, or adding a note about the tuple still ensuring lazy
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe