3 ms·
It's useful if you want to e.g. traverse a custom tree structure with an effectful function. You can write the function that just does one level of the tree and
by lmm 10y ago
It's useful if you want to e.g. traverse a custom tree structure with an effectful function. You can write the function that just does one level of the tree and pass it to mfix to get a version that does the whole tree recursively, composing the effects in the way that naturally makes sense for that kind of effect.